rm(list=ls())
gc()
setwd("/hpc/group/pbenfeylab/CheWei/CW_data/genesys/")
| used | (Mb) | gc trigger | (Mb) | max used | (Mb) | |
|---|---|---|---|---|---|---|
| Ncells | 624160 | 33.4 | 1358941 | 72.6 | 1335971 | 71.4 |
| Vcells | 1157075 | 8.9 | 8388608 | 64.0 | 1802277 | 13.8 |
## Need seu4
suppressMessages(library(Seurat))
suppressMessages(library(cowplot))
suppressMessages(library(scattermore))
suppressMessages(library(scater))
suppressMessages(library(cowplot))
suppressMessages(library(RColorBrewer))
suppressMessages(library(grid))
suppressMessages(library(gplots))
suppressMessages(library(circular))
suppressMessages(library(ggplot2))
suppressMessages(library(ggnewscale))
suppressMessages(library(tidyverse))
suppressMessages(library(ComplexHeatmap))
suppressMessages(library(circlize))
suppressMessages(library(patchwork))
Warning message: “package ‘ggplot2’ was built under R version 4.2.3” Warning message: “package ‘dplyr’ was built under R version 4.2.3”
sessionInfo()
R version 4.2.2 (2022-10-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Stream 8 Matrix products: default BLAS/LAPACK: /hpc/group/pbenfeylab/ch416/miniconda3/envs/seu4/lib/libopenblasp-r0.3.21.so locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] grid stats4 stats graphics grDevices utils datasets [8] methods base other attached packages: [1] patchwork_1.1.2 circlize_0.4.15 [3] ComplexHeatmap_2.14.0 forcats_0.5.2 [5] stringr_1.5.0 dplyr_1.1.1 [7] purrr_1.0.1 readr_2.1.3 [9] tidyr_1.3.0 tibble_3.2.1 [11] tidyverse_1.3.2 ggnewscale_0.4.8 [13] circular_0.4-95 gplots_3.1.3 [15] RColorBrewer_1.1-3 scater_1.26.0 [17] ggplot2_3.4.2 scuttle_1.8.0 [19] SingleCellExperiment_1.20.0 SummarizedExperiment_1.28.0 [21] Biobase_2.58.0 GenomicRanges_1.50.0 [23] GenomeInfoDb_1.34.8 IRanges_2.32.0 [25] S4Vectors_0.36.0 BiocGenerics_0.44.0 [27] MatrixGenerics_1.10.0 matrixStats_0.63.0 [29] scattermore_0.8 cowplot_1.1.1 [31] SeuratObject_4.1.3 Seurat_4.1.1.9001 loaded via a namespace (and not attached): [1] utf8_1.2.3 spatstat.explore_3.1-0 [3] reticulate_1.28 tidyselect_1.2.0 [5] htmlwidgets_1.6.2 BiocParallel_1.32.5 [7] Rtsne_0.16 munsell_0.5.0 [9] ScaledMatrix_1.6.0 codetools_0.2-19 [11] ica_1.0-3 pbdZMQ_0.3-8 [13] future_1.32.0 miniUI_0.1.1.1 [15] withr_2.5.0 spatstat.random_3.1-4 [17] colorspace_2.1-0 progressr_0.13.0 [19] uuid_1.1-0 ROCR_1.0-11 [21] tensor_1.5 listenv_0.9.0 [23] repr_1.1.4 GenomeInfoDbData_1.2.9 [25] polyclip_1.10-4 parallelly_1.35.0 [27] vctrs_0.6.2 generics_0.1.3 [29] timechange_0.1.1 doParallel_1.0.17 [31] R6_2.5.1 clue_0.3-64 [33] ggbeeswarm_0.7.1 rsvd_1.0.5 [35] bitops_1.0-7 spatstat.utils_3.0-2 [37] DelayedArray_0.24.0 assertthat_0.2.1 [39] promises_1.2.0.1 scales_1.2.1 [41] googlesheets4_1.0.1 beeswarm_0.4.0 [43] gtable_0.3.3 beachmat_2.14.0 [45] globals_0.16.2 goftest_1.2-3 [47] rlang_1.1.0 GlobalOptions_0.1.2 [49] splines_4.2.2 lazyeval_0.2.2 [51] gargle_1.2.1 spatstat.geom_3.1-0 [53] broom_1.0.2 modelr_0.1.10 [55] reshape2_1.4.4 abind_1.4-5 [57] backports_1.4.1 httpuv_1.6.9 [59] tools_4.2.2 ellipsis_0.3.2 [61] ggridges_0.5.4 Rcpp_1.0.10 [63] plyr_1.8.8 base64enc_0.1-3 [65] sparseMatrixStats_1.10.0 zlibbioc_1.44.0 [67] RCurl_1.98-1.6 deldir_1.0-6 [69] GetoptLong_1.0.5 pbapply_1.7-0 [71] viridis_0.6.2 zoo_1.8-12 [73] haven_2.5.1 ggrepel_0.9.3 [75] cluster_2.1.4 fs_1.6.1 [77] magrittr_2.0.3 data.table_1.14.8 [79] RSpectra_0.16-1 reprex_2.0.2 [81] lmtest_0.9-40 RANN_2.6.1 [83] googledrive_2.0.0 mvtnorm_1.1-3 [85] fitdistrplus_1.1-8 hms_1.1.2 [87] mime_0.12 evaluate_0.20 [89] xtable_1.8-4 readxl_1.4.1 [91] shape_1.4.6 fastDummies_1.6.3 [93] gridExtra_2.3 compiler_4.2.2 [95] KernSmooth_2.23-20 crayon_1.5.2 [97] htmltools_0.5.5 tzdb_0.3.0 [99] later_1.3.0 lubridate_1.9.0 [101] DBI_1.1.3 dbplyr_2.2.1 [103] MASS_7.3-58.3 boot_1.3-28.1 [105] Matrix_1.5-4 cli_3.6.1 [107] parallel_4.2.2 igraph_1.4.2 [109] pkgconfig_2.0.3 sp_1.6-0 [111] IRdisplay_1.1 plotly_4.10.1 [113] spatstat.sparse_3.0-1 foreach_1.5.2 [115] xml2_1.3.3 vipor_0.4.5 [117] XVector_0.38.0 rvest_1.0.3 [119] digest_0.6.31 sctransform_0.3.5 [121] RcppAnnoy_0.0.20 spatstat.data_3.0-1 [123] cellranger_1.1.0 leiden_0.4.3 [125] uwot_0.1.14 DelayedMatrixStats_1.20.0 [127] shiny_1.7.4 gtools_3.9.4 [129] rjson_0.2.21 lifecycle_1.0.3 [131] nlme_3.1-162 jsonlite_1.8.4 [133] BiocNeighbors_1.16.0 viridisLite_0.4.1 [135] fansi_1.0.4 pillar_1.9.0 [137] lattice_0.21-8 fastmap_1.1.1 [139] httr_1.4.5 survival_3.4-0 [141] glue_1.6.2 iterators_1.0.14 [143] png_0.1-8 stringi_1.7.12 [145] RcppHNSW_0.4.1 BiocSingular_1.14.0 [147] caTools_1.18.2 IRkernel_1.3.1.9000 [149] irlba_2.3.5.1 future.apply_1.10.0
wanted_TFs <- read.csv("./Kay_TF_thalemine_annotations.csv")
nrow(wanted_TFs)
## Make TF names unique
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G33880"]="WOX9"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G45160"]="SCL27"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G04410"]="NAC78"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G29035"]="ORS1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G02540"]="ZHD3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G16500"]="IAA26"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G09740"]="HAG5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G24660"]="ZHD2"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G46880"]="HDG5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G28420"]="RLT1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G14580"]="BLJ"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G45260"]="BIB"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G02070"]="RVN"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G28160"]="FIT"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G68360"]="GIS3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G20640"]="NLP4"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G05550"]="VFP5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G59470"]="FRF1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G15150"]="HAT7"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G14750"]="WER"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G75710"]="BRON"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G74500"]="TMO7"
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G12646"]="RITF1"
wanted_TFs$Name[wanted_TFs$GeneID=="AT3G48100"]="ARR5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G16141"]="GATA17L"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G65640"]="NFL"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G62700"]="VND5"
wanted_TFs$Name[wanted_TFs$GeneID=="AT4G36160"]="VND2"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G66300"]="VND3"
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G12260"]="VND4"
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G62380"]="VND6"
## TTG1
wanted_TFs$Name[wanted_TFs$GeneID=="AT5G24520"]
## SCRAMBLED
wanted_TFs$Name[wanted_TFs$GeneID=="AT1G11130"]
## CAPRICE
wanted_TFs$Name[wanted_TFs$GeneID=="AT2G46410"]
stem2pro <- read.csv("./TF_GRN_centrality_t0-t1_zscore3.csv")
pro2trans <- read.csv("./TF_GRN_centrality_t1-t3_zscore3.csv")
trans2el <- read.csv("./TF_GRN_centrality_t3-t5_zscore3.csv")
el2el <- read.csv("./TF_GRN_centrality_t5-t7_zscore3.csv")
el2mat <- read.csv("./TF_GRN_centrality_t7-t9_zscore3.csv")
head(stem2pro)
| X | tf_occurance | atri_degree_centrality | atri_out_centrality | atri_in_centrality | atri_betweenness_centrality | atri_closeness_centrality | atri_eigenvector_centrality | tri_degree_centrality | tri_out_centrality | ... | phl_in_centrality | phl_betweenness_centrality | phl_closeness_centrality | phl_eigenvector_centrality | col_degree_centrality | col_out_centrality | col_in_centrality | col_betweenness_centrality | col_closeness_centrality | col_eigenvector_centrality | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | ... | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
| 1 | GAMMA-H2AX | 10 | 0.8986486 | 0.3445946 | 0.55405405 | 0.824314156 | 0.001607054 | 0.11806416 | 0.80544747 | 0.12451362 | ... | 0.1495017 | 0.248917916 | 0.0011086941 | 0.06175429 | 0.07805907 | 0.02742616 | 0.05063291 | 0.31334238 | 0.0003917786 | 0.03439140 |
| 2 | CRF2 | 9 | 0.9729730 | 0.4436937 | 0.52927928 | 0.987777846 | 0.001552485 | 0.12188729 | 1.17898833 | 0.73929961 | ... | 0.3172757 | 0.630057324 | 0.0013108166 | 0.07501625 | 0.79746835 | 0.33438819 | 0.46308017 | 0.93998481 | 0.0005974520 | 0.11139614 |
| 3 | HMGB6 | 9 | 0.2612613 | 0.2049550 | 0.05630631 | 0.002308177 | 0.001400878 | 0.06217343 | 0.45136187 | 0.28015564 | ... | 0.1029900 | 0.005635679 | 0.0009932707 | 0.04870514 | 0.03375527 | 0.01582278 | 0.01793249 | 0.00000000 | 0.0003046752 | 0.01628732 |
| 4 | HAT1 | 9 | 0.4054054 | 0.2162162 | 0.18918919 | 0.002852175 | 0.001266005 | 0.07435692 | 0.05058366 | 0.04669261 | ... | 0.4302326 | 0.967158833 | 0.0012671678 | 0.08334429 | 0.48206751 | 0.24156118 | 0.24050633 | 0.02677119 | 0.0005415002 | 0.09398170 |
| 5 | GRP2B | 9 | 0.2702703 | 0.1238739 | 0.14639640 | 0.038954304 | 0.001162324 | 0.06130034 | 0.00000000 | 0.00000000 | ... | 0.5332226 | 0.966937717 | 0.0012946771 | 0.08259318 | 0.67299578 | 0.41561181 | 0.25738397 | 0.28124346 | 0.0005718634 | 0.10969489 |
| 6 | HB-2 | 9 | 0.5045045 | 0.3243243 | 0.18018018 | 0.621901247 | 0.001388507 | 0.08859595 | 0.04669261 | 0.01167315 | ... | 0.3039867 | 0.856015169 | 0.0013859050 | 0.08585141 | 0.54852321 | 0.13502110 | 0.41350211 | 0.01482474 | 0.0005300467 | 0.10354056 |
min_max_normalize <- function(data) {
min_val <- min(data)
max_val <- max(data)
normalized_data <- (data - min_val) / (max_val - min_val)
return(normalized_data)
}
summary(stem2pro$tri_betweenness_centrality)
Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0000 0.0000 0.0000 0.0236 0.0000 0.9904
summary(min_max_normalize(stem2pro$tri_betweenness_centrality))
Min. 1st Qu. Median Mean 3rd Qu. Max. 0.00000 0.00000 0.00000 0.02383 0.00000 1.00000
ncol(stem2pro)
stem2pro <- as.data.frame(cbind(stem2pro[,1],apply(stem2pro[,3:62],2,min_max_normalize)))
pro2trans <- as.data.frame(cbind(pro2trans[,1],apply(pro2trans[,3:62],2,min_max_normalize)))
trans2el <- as.data.frame(cbind(trans2el[,1],apply(trans2el[,3:62],2,min_max_normalize)))
el2el <- as.data.frame(cbind(el2el[,1],apply(el2el[,3:62],2,min_max_normalize)))
el2mat <- as.data.frame(cbind(el2mat[,1],apply(el2mat[,3:62],2,min_max_normalize)))
dat <- stem2pro %>%
left_join(pro2trans, by = "V1") %>%
left_join(trans2el, by = "V1") %>%
left_join(el2el, by = "V1") %>%
left_join(el2mat, by = "V1")
dat[is.na(dat)] <- 0
n <- c('atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality',
'tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality',
'lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality',
'cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality',
'end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality',
'per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality',
'pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality',
'xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality',
'phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality',
'col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality')
colnames(dat) <- c("TF",gsub("$","_1",n), gsub("$","_2",n),gsub("$","_3",n),gsub("$","_4",n),gsub("$","_5",n))
GeneID <- wanted_TFs$GeneID[match(dat$TF, wanted_TFs$Name)]
dat <- cbind(GeneID, dat)
head(dat)
| GeneID | TF | atri_degree_centrality_1 | atri_out_centrality_1 | atri_in_centrality_1 | atri_betweenness_centrality_1 | atri_closeness_centrality_1 | atri_eigenvector_centrality_1 | tri_degree_centrality_1 | tri_out_centrality_1 | ... | phl_in_centrality_5 | phl_betweenness_centrality_5 | phl_closeness_centrality_5 | phl_eigenvector_centrality_5 | col_degree_centrality_5 | col_out_centrality_5 | col_in_centrality_5 | col_betweenness_centrality_5 | col_closeness_centrality_5 | col_eigenvector_centrality_5 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | ... | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | |
| 1 | AT1G54690 | GAMMA-H2AX | 0.776264591439689 | 0.495145631067961 | 0.763975155279503 | 0.834513711603393 | 0.940151233514354 | 0.954898795508496 | 0.63302752293578 | 0.135593220338983 | ... | 0.00353356890459364 | 0 | 0.433778629760381 | 0.0384080822193205 | 0 | 0 | 0 | 0 | 0 | 0 |
| 2 | AT4G23750 | CRF2 | 0.840466926070039 | 0.637540453074434 | 0.729813664596273 | 1 | 0.90822754077444 | 0.985820114506607 | 0.926605504587156 | 0.805084745762712 | ... | 0.0117785630153121 | 0.0001122768497611 | 0.579606861231972 | 0.117223661689331 | 0 | 0 | 0 | 0 | 0 | 0 |
| 3 | AT5G23420 | HMGB6 | 0.22568093385214 | 0.294498381877023 | 0.077639751552795 | 0.0023367372148563 | 0.819534761406972 | 0.502856548739284 | 0.35474006116208 | 0.305084745762712 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 4 | AT4G17460 | HAT1 | 0.350194552529183 | 0.310679611650485 | 0.260869565217391 | 0.00288746602981141 | 0.740632037115667 | 0.601396170660393 | 0.0397553516819572 | 0.0508474576271186 | ... | 0.00235571260306243 | 0 | 0.462623504191286 | 0.0384080822193205 | 0.00424088210347752 | 0.00672268907563025 | 0.00171232876712329 | 0 | 0.534086128307187 | 0.0342094681539202 |
| 5 | AT2G21060 | GRP2B | 0.233463035019455 | 0.177993527508091 | 0.201863354037267 | 0.0394363007494029 | 0.67997746133997 | 0.495794974854396 | 0 | 0 | ... | 0.156654888103651 | 0.00484869654894231 | 0.874134371864073 | 0.556195610463054 | 0.00508905852417303 | 0.00672268907563025 | 0.00342465753424658 | 0 | 0.474466815605091 | 0.0339845056831895 |
| 6 | AT4G16780 | HB-2 | 0.43579766536965 | 0.466019417475728 | 0.248447204968944 | 0.629596269455653 | 0.81229784641811 | 0.716560956988195 | 0.036697247706422 | 0.0127118644067797 | ... | 0.00117785630153121 | 0 | 0.398777242871396 | 0.0289197059513674 | 0 | 0 | 0 | 0 | 0 | 0 |
numz <- function(x){
sum(x==0)/length(x)
}
dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric)))
dat$celltype_specificity <- min_max_normalize(apply(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric),1,numz))
dat$weighted_score <- dat$combined_score + dat$celltype_specificity
dat <- dat %>% arrange(desc(weighted_score))
head(dat)
| GeneID | TF | atri_degree_centrality_1 | atri_out_centrality_1 | atri_in_centrality_1 | atri_betweenness_centrality_1 | atri_closeness_centrality_1 | atri_eigenvector_centrality_1 | tri_degree_centrality_1 | tri_out_centrality_1 | ... | phl_eigenvector_centrality_5 | col_degree_centrality_5 | col_out_centrality_5 | col_in_centrality_5 | col_betweenness_centrality_5 | col_closeness_centrality_5 | col_eigenvector_centrality_5 | combined_score | celltype_specificity | weighted_score | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | ... | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <chr> | <dbl> | <dbl> | <dbl> | |
| 1 | AT5G24800 | BZIP9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0.991229312680569 | 0 | 0 | 0 | 0 | 0 | 0 | 0.7370916 | 0.6000000 | 1.337092 |
| 2 | AT3G43430 | AT3G43430 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0.481531356662094 | 0 | 0 | 0 | 0 | 0 | 0 | 0.7528181 | 0.4978723 | 1.250690 |
| 3 | AT5G15150 | HAT7 | 0 | 0 | 0 | 0 | 0 | 0 | 0.253822629969419 | 0.038135593220339 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.7999175 | 0.4425532 | 1.242471 |
| 4 | AT3G20840 | PLT1 | 0.961089494163424 | 0.970873786407767 | 0.602484472049689 | 0.976313513958659 | 0.914746192175766 | 0.986144172298438 | 0 | 0 | ... | 0 | 0.0398642917726887 | 0.0756302521008403 | 0.00342465753424658 | 0 | 0.745449540294179 | 0.250685880776617 | 0.5516755 | 0.6680851 | 1.219761 |
| 5 | AT5G57620 | MYB36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.4791306 | 0.7148936 | 1.194024 |
| 6 | AT2G45050 | GATA2 | 1 | 0.828478964401295 | 0.801242236024845 | 0.998594869472124 | 0.965657213462023 | 1 | 0.981651376146789 | 0.936440677966102 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.7860795 | 0.4042553 | 1.190335 |
write.csv(dat,"TF_GRN_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=FALSE)
gene_list <- read.table('./gene_list_1108.csv', sep=",", header = TRUE)
exptf <- intersect(gene_list$features, wanted_TFs$GeneID)
length(exptf)
sfun <- read.csv('string_functional_annotations.tsv', sep="\t", header=TRUE)
sann <- read.csv('string_protein_annotations.tsv', sep="\t", header=TRUE)
gsgo1 <- unique(sfun[grep('root|xylem|phloem|procambium|pericycle|vascular|vasculature|stele|tracheary|sieve|trichoblast|atrichoblast|epidermis|epidermal tissue|lateral root cap|root hair|trichome|cortex|endodermis|ground tissue|columella|quiescent center',sfun$term.description, ignore.case=TRUE),]$X.node)
gsgo2 <- unique(sann[grep('root|xylem|phloem|procambium|pericycle|vascular|vasculature|stele|tracheary|sieve|trichoblast|atrichoblast|epidermis|epidermal tissue|lateral root cap|root hair|trichome|cortex|endodermis|ground tissue|columella|quiescent center',sann$domain_summary_url, ignore.case=TRUE),]$X.node)
gsgo <- sort(unique(c(gsgo1, gsgo2)))
#write.csv(data.frame(GeneID=gsgo),"./Gold_Standard_Root_TF_StringDB.csv", quote=FALSE, row.names=FALSE)
length(gsgo)
gsgo
gsgo <- gsub(",.*$","",gsub("^.*ath:","",sann[match(gsgo, sann$X.node),]$other_names_and_aliases))
gsgo[which(gsgo=='831248')]='AT5G14000'
gsgo
sann[which(sann$X.node=="HAT7"),]
| X.node | identifier | domain_summary_url | annotation | other_names_and_aliases | |
|---|---|---|---|---|---|
| <chr> | <chr> | <chr> | <chr> | <chr> | |
| 668 | HAT7 | 3702.Q00466 | Homeobox-leucine zipper protein HAT7; Probable transcription factor. | https://smart.embl.de/smart/DDvec.cgi?smart=314:HOX(113|174)+ | 831367,AT5G15150,ATHB-3,At5g15150,F8M21_40,HAT7,HAT7_ARATH,HB-3,HD-ZIP protein 7,HD-ZIP protein ATHB-3,Homeobox 3,Homeobox-leucine zipper protein,Homeobox-leucine zipper protein HAT7,Homeodomain transcription factor ATHB-3,Homeodomain-leucine zipper protein HAT7,NM_121519.3,NP_568309,NP_568309.2,Q00466,Q0WNS2,Q9LXG6,ath:AT5G15150 |
sann[grep("831248",sann$other_names_and_aliases, ignore.case = TRUE),]
| X.node | identifier | domain_summary_url | annotation | other_names_and_aliases | |
|---|---|---|---|---|---|
| <chr> | <chr> | <chr> | <chr> | <chr> | |
| 980 | NAC084 | 3702.A0A1P8BAC2 | NAC domain containing protein 84. | https://smart.embl.de/smart/DDvec.cgi?smart=262:Pfam_NAM(16|196)+ | 831248,A0A1P8BAC2,A0A1P8BAC2_ARATH,At5g14000,MAC12.3,MAC12_3,NAC domain containing protein 84,NAC084,NM_001343305.1,NP_001330278.1,anac084 |
r50 <- 105
numz <- function(x){
sum(x==0)/length(x)
}
genesys <- dat
run_r50_genesys <- function(x){
genesys$combined_score <- min_max_normalize(rowSums(apply(genesys[,grep(x,colnames(genesys))],2,as.numeric)))
genesys <- genesys %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(genesys))){
if (genesys$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## all cell type : in centrality + celltype & dev stage specificity
#dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("in_centrality",colnames(dat))],2,as.numeric)))
#dat$celltype_specificity <- min_max_normalize(apply(apply(dat[,grep("in_centrality",colnames(dat))],2,as.numeric),1,numz))
#dat$weighted_score <- dat$combined_score + dat$celltype_specificity
#dat <- dat %>% arrange(desc(weighted_score))
#count <- 0
#for (i in seq(nrow(dat))){
# if (dat$GeneID[i] %in% gsgo){
# count <- count +1
# if (count == r50){
# print(i)
# break
# }
# }
#}
prepros <- function(x){
dat <- read.csv(x)
#dat <- dat %>% filter(role=="Connector Hub")
dat <- dat[,c(1, grep("centrality",colnames(dat)), 22)]
return(dat)
}
atri <- prepros("../celloracle/atrichoblast_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
tri <- prepros("../celloracle/trichoblast_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
lrc <- prepros("../celloracle/lrc_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
cor <- prepros("../celloracle/cortex_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
end <- prepros("../celloracle/endodermis_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
per <- prepros("../celloracle/pericycle_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
pro <- prepros("../celloracle/procambium_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
xyl <- prepros("../celloracle/xylem_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
phl <- prepros("../celloracle/phloem_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
col <- prepros("../celloracle/columella_Root_Atlas_SCT_celloracle_gene_score_iGRN.csv")
dat <- rbind(atri, tri, lrc, cor, end, per, pro, xyl, phl, col)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all),
in_centrality = min_max_normalize(degree_centrality_in),
out_centrality = min_max_normalize(degree_centrality_out),
betweenness_centrality = min_max_normalize(betweenness_centrality),
closeness_centrality = min_max_normalize(closeness_centrality),
eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality),
in_centrality = sum(in_centrality),
out_centrality = sum(out_centrality),
betweenness_centrality = sum(betweenness_centrality),
closeness_centrality = sum(closeness_centrality),
eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:7],2,min_max_normalize))
head(dat)
| GeneID | degree_centrality | in_centrality | out_centrality | betweenness_centrality | closeness_centrality | eigenvector_centrality | |
|---|---|---|---|---|---|---|---|
| <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
| 1 | AT1G01010 | 0.0849393998 | 0.065317964 | 0.081735954 | 2.592974e-02 | 0.3643692412 | 0.068339145 |
| 2 | AT1G01030 | 0.0009542021 | 0.000000000 | 0.004447568 | 0.000000e+00 | 0.0003449773 | 0.003632920 |
| 3 | AT1G01260 | 0.0233438132 | 0.000000000 | 0.033565069 | 0.000000e+00 | 0.0872081085 | 0.016136854 |
| 4 | AT1G01350 | 0.0293468347 | 0.134378356 | 0.000000000 | 0.000000e+00 | 0.0000000000 | 0.017764785 |
| 5 | AT1G01380 | 0.0035614661 | 0.005492245 | 0.004573149 | 7.240465e-05 | 0.0852853904 | 0.003752290 |
| 6 | AT1G01640 | 0.0060441842 | 0.023215800 | 0.000000000 | 0.000000e+00 | 0.0000000000 | 0.006672674 |
celloracle <- dat
run_r50_celloracle <- function(x){
celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
celloracle <- celloracle %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(celloracle))){
if (celloracle$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## all cell type : degree centrality + out centrality + in centrality + betweenness centrality + closeness + eigenvector
#dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("centrality",colnames(dat))],2,as.numeric)))
#dat <- dat %>% arrange(desc(combined_score))
#count <- 0
#for (i in seq(nrow(dat))){
# if (dat$GeneID[i] %in% gsgo){
# count <- count +1
# if (count == r50){
# print(i)
# break
# }
# }
#}
#dat$combined_score <- min_max_normalize(rowSums(apply(dat[,grep("betweenness_centrality|celltype_specificity",colnames(dat))],2,as.numeric)))
#dat <- dat %>% arrange(desc(combined_score))
#count <- 0
#for (i in seq(nrow(dat))){
# if (dat$GeneID[i] %in% gsgo){
# count <- count +1
# if (count == r50){
# print(i)
# break
# }
# }
#}
de <- read.csv("Root_Atlas_DE_Gene_List.csv")
de <- de %>% arrange(pct.diff_rank) %>% arrange(avg_diff_rank)%>% arrange(myAUC_rank)%>% arrange(combined_rank)
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene.ID,exptf)),]
head(de)
| myAUC | avg_diff | power | pct.1 | pct.2 | celltype | pseudotime.bin | gene.ID | gene.name | pct.diff | pct.diff_rank | avg_diff_rank | myAUC_rank | combined_rank | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | <chr> | <chr> | <dbl> | <int> | <int> | <int> | <int> | |
| 13 | 0.901 | 1.985825 | 0.802 | 0.959 | 0.287 | Endodermis | T4 | AT5G13910 | LEP | 0.672 | 2 | 4 | 1 | 1 |
| 40 | 0.934 | 2.820810 | 0.868 | 0.900 | 0.155 | Procambium | T0 | AT1G54690 | HTA3 | 0.745 | 2 | 35 | 2 | 1 |
| 51 | 0.841 | 2.351595 | 0.682 | 0.881 | 0.297 | Procambium | T1 | AT1G25560 | TEM1 | 0.584 | 1 | 11 | 3 | 1 |
| 58 | 0.979 | 3.799126 | 0.958 | 1.000 | 0.046 | Xylem | T1 | AT4G22680 | MYB85 | 0.954 | 1 | 7 | 4 | 1 |
| 63 | 0.945 | 4.666402 | 0.890 | 0.765 | 0.054 | Phloem | T2 | AT3G60530 | GATA4 | 0.711 | 35 | 1 | 5 | 1 |
| 66 | 0.871 | 2.623028 | 0.742 | 0.877 | 0.242 | Procambium | T2 | AT1G66600 | WRKY63 | 0.635 | 1 | 5 | 5 | 1 |
dat <- de %>% group_by(gene.ID) %>% reframe(combined_rank = mean(combined_rank),myAUC_rank = mean(myAUC_rank),pct.diff_rank = mean(pct.diff_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(combined_rank)
colnames(dat) <- c("GeneID","combined_rank","myAUC_rank","pct.diff_rank","avg_diff_rank")
head(dat)
| GeneID | combined_rank | myAUC_rank | pct.diff_rank | avg_diff_rank |
|---|---|---|---|---|
| <chr> | <dbl> | <dbl> | <dbl> | <dbl> |
| AT1G66600 | 6.500000 | 19.50000 | 23.00000 | 11.50000 |
| AT5G58010 | 8.333333 | 9.00000 | 7.00000 | 16.00000 |
| AT1G13600 | 9.500000 | 42.00000 | 34.50000 | 19.50000 |
| AT4G37260 | 12.333333 | 10.33333 | 20.33333 | 41.66667 |
| AT1G26680 | 13.000000 | 73.00000 | 37.00000 | 78.00000 |
| AT1G61660 | 13.000000 | 19.66667 | 17.33333 | 38.33333 |
de <- dat
run_r50_de <- function(x){
de$combined_score <- de[,grep(x,colnames(de))]
de <- de %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(de))){
if (de$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
if (ran[i] %in% gsgo){
count <- count +1
if (count == r50){
R50_permutation <- c(R50_permutation,i)
break
}
}
}
}
toplt <- data.frame(Methods=c("GeneSys degree centrality", "GeneSys out centrality", "GeneSys in centrality", "GeneSys betweenness centrality",
"GeneSys closeness centrality", "GeneSys eigenvector centrality","CellOracle degree centrality", "CellOracle out centrality",
"CellOracle in centrality", "CellOracle betweenness centrality", "CellOracle closeness centrality", "CellOracle eigenvector centrality",
"DE myAUC rank", "DE pct diff rank", "DE avg diff rank", "Expressed TFs permutation"),
R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
run_r50_genesys('betweenness_centrality'),run_r50_genesys('closeness_centrality'),run_r50_genesys('eigenvector_centrality'),
run_r50_celloracle('degree_centrality'),run_r50_celloracle('out_centrality'),run_r50_celloracle('in_centrality'),
run_r50_celloracle('betweenness_centrality'),run_r50_celloracle('closeness_centrality'),run_r50_celloracle('eigenvector_centrality'),
run_r50_de('myAUC_rank'),run_r50_de('pct.diff_rank'),run_r50_de('avg_diff_rank'), mean(R50_permutation)))
toplt
| Methods | R50 |
|---|---|
| <chr> | <dbl> |
| GeneSys degree centrality | 403.000 |
| GeneSys out centrality | 409.000 |
| GeneSys in centrality | 383.000 |
| GeneSys betweenness centrality | 372.000 |
| GeneSys closeness centrality | 695.000 |
| GeneSys eigenvector centrality | 460.000 |
| CellOracle degree centrality | 479.000 |
| CellOracle out centrality | 469.000 |
| CellOracle in centrality | 461.000 |
| CellOracle betweenness centrality | 413.000 |
| CellOracle closeness centrality | 505.000 |
| CellOracle eigenvector centrality | 488.000 |
| DE myAUC rank | 484.000 |
| DE pct diff rank | 495.000 |
| DE avg diff rank | 472.000 |
| Expressed TFs permutation | 749.023 |
options(repr.plot.width=8, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE), y=R50)) + geom_point(size=4)+
labs(title="TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
toplt <- data.frame(Methods=factor(c(rep("GeneSys",6), rep("CellOracle",6), rep("DE",3), "Expressed TFs permutation"),
levels=c("Expressed TFs permutation", "DE", "CellOracle", "GeneSys")), R50=toplt$R50)
options(repr.plot.width=9.5, repr.plot.height=6)
ggplot(toplt, aes(x=Methods, y=R50))+
geom_boxplot(width=0.3)+
labs(title="TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,5]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
length(gsgo)
r50 <- 22
## Define genesys
run_r50_genesys <- function(x){
genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('xyl_',x,'|phl_',x,'|pro_',x),colnames(genesys))],2,as.numeric)))
genesys$combined_score <- genesys$ct_score
genesys <- genesys %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(genesys))){
if (genesys$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define celloracle
dat <- rbind(pro, xyl, phl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all),
in_centrality = min_max_normalize(degree_centrality_in),
out_centrality = min_max_normalize(degree_centrality_out),
betweenness_centrality = min_max_normalize(betweenness_centrality),
closeness_centrality = min_max_normalize(closeness_centrality),
eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality),
in_centrality = sum(in_centrality),
out_centrality = sum(out_centrality),
betweenness_centrality = sum(betweenness_centrality),
closeness_centrality = sum(closeness_centrality),
eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:7],2,min_max_normalize))
celloracle <- dat
run_r50_celloracle <- function(x){
celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
celloracle <- celloracle %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(celloracle))){
if (celloracle$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define DE
de <- read.csv("Root_Atlas_DE_Gene_List.csv")
de <- de %>% filter(celltype=="Xylem"|celltype=="Phloem"|celltype=="Procambium")
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene.ID,exptf)),]
dat <- de %>% group_by(gene.ID) %>% reframe(combined_rank = mean(combined_rank),myAUC_rank = mean(myAUC_rank),pct.diff_rank = mean(pct.diff_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(combined_rank)
colnames(dat) <- c("GeneID","combined_rank","myAUC_rank","pct.diff_rank","avg_diff_rank")
de <- dat
run_r50_de <- function(x){
de$combined_score <- de[,grep(x,colnames(de))]
de <- de %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(de))){
if (de$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
if (ran[i] %in% gsgo){
count <- count +1
if (count == r50){
R50_permutation <- c(R50_permutation,i)
break
}
}
}
}
toplt <- data.frame(Methods=c("GeneSys degree centrality", "GeneSys out centrality", "GeneSys in centrality", "GeneSys betweenness centrality",
"GeneSys closeness centrality", "GeneSys eigenvector centrality","CellOracle degree centrality", "CellOracle out centrality",
"CellOracle in centrality", "CellOracle betweenness centrality", "CellOracle closeness centrality", "CellOracle eigenvector centrality",
"DE myAUC rank", "DE pct diff rank", "DE avg diff rank", "Expressed TFs permutation"),
R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
run_r50_genesys('betweenness_centrality'),run_r50_genesys('closeness_centrality'),run_r50_genesys('eigenvector_centrality'),
run_r50_celloracle('degree_centrality'),run_r50_celloracle('out_centrality'),run_r50_celloracle('in_centrality'),
run_r50_celloracle('betweenness_centrality'),run_r50_celloracle('closeness_centrality'),run_r50_celloracle('eigenvector_centrality'),
run_r50_de('myAUC_rank'),run_r50_de('pct.diff_rank'),run_r50_de('avg_diff_rank'), mean(R50_permutation)))
toplt
| Methods | R50 |
|---|---|
| <chr> | <dbl> |
| GeneSys degree centrality | 94.000 |
| GeneSys out centrality | 159.000 |
| GeneSys in centrality | 91.000 |
| GeneSys betweenness centrality | 137.000 |
| GeneSys closeness centrality | 474.000 |
| GeneSys eigenvector centrality | 160.000 |
| CellOracle degree centrality | 288.000 |
| CellOracle out centrality | 255.000 |
| CellOracle in centrality | 190.000 |
| CellOracle betweenness centrality | 154.000 |
| CellOracle closeness centrality | 337.000 |
| CellOracle eigenvector centrality | 252.000 |
| DE myAUC rank | 275.000 |
| DE pct diff rank | 302.000 |
| DE avg diff rank | 245.000 |
| Expressed TFs permutation | 747.206 |
options(repr.plot.width=12, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE), y=R50)) + geom_point(size=4)+
labs(title="Stele-specific TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
toplt <- data.frame(Methods=factor(c(rep("GeneSys",6), rep("CellOracle",6), rep("DE",3), "Expressed TFs permutation"),
levels=c("Expressed TFs permutation", "DE", "CellOracle", "GeneSys")), R50=toplt$R50)
options(repr.plot.width=9.5, repr.plot.height=6)
ggplot(toplt, aes(x=Methods, y=R50))+
geom_boxplot(width=0.3)+
labs(title="Stele-specific TF Prioritization Performance",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,6]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
length(gsgo)
r50 <- 24
## Define genesys
run_r50_genesys <- function(x){
genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('atri_',x,'|tri_',x,'|lrc_',x),colnames(genesys))],2,as.numeric)))
genesys$combined_score <- genesys$ct_score
genesys <- genesys %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(genesys))){
if (genesys$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define celloracle
dat <- rbind(atri, tri, lrc)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all),
in_centrality = min_max_normalize(degree_centrality_in),
out_centrality = min_max_normalize(degree_centrality_out),
betweenness_centrality = min_max_normalize(betweenness_centrality),
closeness_centrality = min_max_normalize(closeness_centrality),
eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality),
in_centrality = sum(in_centrality),
out_centrality = sum(out_centrality),
betweenness_centrality = sum(betweenness_centrality),
closeness_centrality = sum(closeness_centrality),
eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:7],2,min_max_normalize))
celloracle <- dat
run_r50_celloracle <- function(x){
celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
celloracle <- celloracle %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(celloracle))){
if (celloracle$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define DE
de <- read.csv("Root_Atlas_DE_Gene_List.csv")
de <- de %>% filter(celltype=="Atrichoblast"|celltype=="Trichoblast"|celltype=="Lateral Root Cap")
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene.ID,exptf)),]
dat <- de %>% group_by(gene.ID) %>% reframe(combined_rank = mean(combined_rank),myAUC_rank = mean(myAUC_rank),pct.diff_rank = mean(pct.diff_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(combined_rank)
colnames(dat) <- c("GeneID","combined_rank","myAUC_rank","pct.diff_rank","avg_diff_rank")
de <- dat
run_r50_de <- function(x){
de$combined_score <- de[,grep(x,colnames(de))]
de <- de %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(de))){
if (de$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
if (ran[i] %in% gsgo){
count <- count +1
if (count == r50){
R50_permutation <- c(R50_permutation,i)
break
}
}
}
}
toplt <- data.frame(Methods=c("GeneSys degree centrality", "GeneSys out centrality", "GeneSys in centrality", "GeneSys betweenness centrality",
"GeneSys closeness centrality", "GeneSys eigenvector centrality","CellOracle degree centrality", "CellOracle out centrality",
"CellOracle in centrality", "CellOracle betweenness centrality", "CellOracle closeness centrality", "CellOracle eigenvector centrality",
"DE myAUC rank", "DE pct diff rank", "DE avg diff rank", "Expressed TFs permutation"),
R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
run_r50_genesys('betweenness_centrality'),run_r50_genesys('closeness_centrality'),run_r50_genesys('eigenvector_centrality'),
run_r50_celloracle('degree_centrality'),run_r50_celloracle('out_centrality'),run_r50_celloracle('in_centrality'),
run_r50_celloracle('betweenness_centrality'),run_r50_celloracle('closeness_centrality'),run_r50_celloracle('eigenvector_centrality'),
999,999,999, mean(R50_permutation)))
toplt
| Methods | R50 |
|---|---|
| <chr> | <dbl> |
| GeneSys degree centrality | 288.00 |
| GeneSys out centrality | 339.00 |
| GeneSys in centrality | 318.00 |
| GeneSys betweenness centrality | 329.00 |
| GeneSys closeness centrality | 355.00 |
| GeneSys eigenvector centrality | 309.00 |
| CellOracle degree centrality | 391.00 |
| CellOracle out centrality | 365.00 |
| CellOracle in centrality | 455.00 |
| CellOracle betweenness centrality | 304.00 |
| CellOracle closeness centrality | 351.00 |
| CellOracle eigenvector centrality | 392.00 |
| DE myAUC rank | 999.00 |
| DE pct diff rank | 999.00 |
| DE avg diff rank | 999.00 |
| Expressed TFs permutation | 729.58 |
options(repr.plot.width=12, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE), y=R50)) + geom_point(size=4)+
labs(title="Epidermis-specific TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
toplt <- data.frame(Methods=factor(c(rep("GeneSys",6), rep("CellOracle",6), rep("DE",3), "Expressed TFs permutation"),
levels=c("DE","Expressed TFs permutation", "CellOracle", "GeneSys")), R50=toplt$R50)
options(repr.plot.width=9.5, repr.plot.height=6)
ggplot(toplt, aes(x=Methods, y=R50))+
geom_boxplot(width=0.3)+
labs(title="Epidermis-specific TF Prioritization Performance",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,7]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
length(gsgo)
r50 <- 15
## Define genesys
run_r50_genesys <- function(x){
genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('xyl_',x),colnames(genesys))],2,as.numeric)))
genesys$combined_score <- genesys$ct_score
genesys <- genesys %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(genesys))){
if (genesys$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define celloracle
dat <- rbind(xyl)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all),
in_centrality = min_max_normalize(degree_centrality_in),
out_centrality = min_max_normalize(degree_centrality_out),
betweenness_centrality = min_max_normalize(betweenness_centrality),
closeness_centrality = min_max_normalize(closeness_centrality),
eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality),
in_centrality = sum(in_centrality),
out_centrality = sum(out_centrality),
betweenness_centrality = sum(betweenness_centrality),
closeness_centrality = sum(closeness_centrality),
eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:7],2,min_max_normalize))
celloracle <- dat
run_r50_celloracle <- function(x){
celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
celloracle <- celloracle %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(celloracle))){
if (celloracle$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define DE
de <- read.csv("Root_Atlas_DE_Gene_List.csv")
de <- de %>% filter(celltype=="Xylem")
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene.ID,exptf)),]
dat <- de %>% group_by(gene.ID) %>% reframe(combined_rank = mean(combined_rank),myAUC_rank = mean(myAUC_rank),pct.diff_rank = mean(pct.diff_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(combined_rank)
colnames(dat) <- c("GeneID","combined_rank","myAUC_rank","pct.diff_rank","avg_diff_rank")
de <- dat
run_r50_de <- function(x){
de$combined_score <- de[,grep(x,colnames(de))]
de <- de %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(de))){
if (de$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
if (ran[i] %in% gsgo){
count <- count +1
if (count == r50){
R50_permutation <- c(R50_permutation,i)
break
}
}
}
}
toplt <- data.frame(Methods=c("GeneSys degree centrality", "GeneSys out centrality", "GeneSys in centrality", "GeneSys betweenness centrality",
"GeneSys closeness centrality", "GeneSys eigenvector centrality","CellOracle degree centrality", "CellOracle out centrality",
"CellOracle in centrality", "CellOracle betweenness centrality", "CellOracle closeness centrality", "CellOracle eigenvector centrality",
"DE myAUC rank", "DE pct diff rank", "DE avg diff rank", "Expressed TFs permutation"),
R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
run_r50_genesys('betweenness_centrality'),run_r50_genesys('closeness_centrality'),run_r50_genesys('eigenvector_centrality'),
run_r50_celloracle('degree_centrality'),run_r50_celloracle('out_centrality'),run_r50_celloracle('in_centrality'),
run_r50_celloracle('betweenness_centrality'),run_r50_celloracle('closeness_centrality'),run_r50_celloracle('eigenvector_centrality'),
run_r50_de('myAUC_rank'),run_r50_de('pct.diff_rank'),run_r50_de('avg_diff_rank'), mean(R50_permutation)))
toplt
| Methods | R50 |
|---|---|
| <chr> | <dbl> |
| GeneSys degree centrality | 30.000 |
| GeneSys out centrality | 65.000 |
| GeneSys in centrality | 27.000 |
| GeneSys betweenness centrality | 54.000 |
| GeneSys closeness centrality | 47.000 |
| GeneSys eigenvector centrality | 37.000 |
| CellOracle degree centrality | 90.000 |
| CellOracle out centrality | 88.000 |
| CellOracle in centrality | 65.000 |
| CellOracle betweenness centrality | 50.000 |
| CellOracle closeness centrality | 135.000 |
| CellOracle eigenvector centrality | 62.000 |
| DE myAUC rank | 130.000 |
| DE pct diff rank | 133.000 |
| DE avg diff rank | 108.000 |
| Expressed TFs permutation | 725.408 |
options(repr.plot.width=12, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE), y=R50)) + geom_point(size=4)+
labs(title="Xylem-specific TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
toplt <- data.frame(Methods=factor(c(rep("GeneSys",6), rep("CellOracle",6), rep("DE",3), "Expressed TFs permutation"),
levels=c("Expressed TFs permutation","DE", "CellOracle", "GeneSys")), R50=toplt$R50)
options(repr.plot.width=9.5, repr.plot.height=6)
ggplot(toplt, aes(x=Methods, y=R50))+
geom_boxplot(width=0.3)+
labs(title="Xylem-specific TF Prioritization Performance",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
gsgo <- read.csv("./Gold_Standard_Root_TF_StringDB.csv", header=TRUE)
gsgo <- gsgo[which(gsgo[,8]=="Yes"),]
gsgo$preferredName
gsgo <- gsgo$GeneID
length(gsgo)
r50 <- 18
## Define genesys
run_r50_genesys <- function(x){
genesys$ct_score <- min_max_normalize(rowSums(apply(genesys[,grep(paste0('^tri_',x),colnames(genesys))],2,as.numeric)))
genesys$combined_score <- genesys$ct_score
genesys <- genesys %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(genesys))){
if (genesys$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define celloracle
dat <- rbind(tri)
## Remove those not present in the dataset
dat <- dat[!is.na(match(dat$X,exptf)),]
dat <- dat %>% group_by(cluster) %>% reframe(GeneID=X,degree_centrality = min_max_normalize(degree_centrality_all),
in_centrality = min_max_normalize(degree_centrality_in),
out_centrality = min_max_normalize(degree_centrality_out),
betweenness_centrality = min_max_normalize(betweenness_centrality),
closeness_centrality = min_max_normalize(closeness_centrality),
eigenvector_centrality = min_max_normalize(eigenvector_centrality))
dat <- dat %>% group_by(GeneID) %>% reframe(degree_centrality = sum(degree_centrality),
in_centrality = sum(in_centrality),
out_centrality = sum(out_centrality),
betweenness_centrality = sum(betweenness_centrality),
closeness_centrality = sum(closeness_centrality),
eigenvector_centrality = sum(eigenvector_centrality))
dat <- cbind(dat[,1],apply(dat[,2:7],2,min_max_normalize))
celloracle <- dat
run_r50_celloracle <- function(x){
celloracle$combined_score <- celloracle[,grep(x,colnames(celloracle))]
celloracle <- celloracle %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(celloracle))){
if (celloracle$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Define DE
de <- read.csv("Root_Atlas_DE_Gene_List.csv")
de <- de %>% filter(celltype=="Trichoblast")
## Remove those not present in the dataset
de <- de[!is.na(match(de$gene.ID,exptf)),]
dat <- de %>% group_by(gene.ID) %>% reframe(combined_rank = mean(combined_rank),myAUC_rank = mean(myAUC_rank),pct.diff_rank = mean(pct.diff_rank),avg_diff_rank = mean(avg_diff_rank))
dat <- dat %>% arrange(combined_rank)
colnames(dat) <- c("GeneID","combined_rank","myAUC_rank","pct.diff_rank","avg_diff_rank")
de <- dat
run_r50_de <- function(x){
de$combined_score <- de[,grep(x,colnames(de))]
de <- de %>% arrange(desc(combined_score))
count <- 0
for (i in seq(nrow(de))){
if (de$GeneID[i] %in% gsgo){
count <- count +1
if (count == r50){
return(i)
break
}
}
}
}
## Expressed TFs permutation
R50_permutation <- c()
for (j in 1:1000){
ran <- sample(exptf, length(exptf), replace=FALSE)
count <- 0
for (i in seq(length(ran))){
if (ran[i] %in% gsgo){
count <- count +1
if (count == r50){
R50_permutation <- c(R50_permutation,i)
break
}
}
}
}
toplt <- data.frame(Methods=c("GeneSys degree centrality", "GeneSys out centrality", "GeneSys in centrality", "GeneSys betweenness centrality",
"GeneSys closeness centrality", "GeneSys eigenvector centrality","CellOracle degree centrality", "CellOracle out centrality",
"CellOracle in centrality", "CellOracle betweenness centrality", "CellOracle closeness centrality", "CellOracle eigenvector centrality",
"DE myAUC rank", "DE pct diff rank", "DE avg diff rank", "Expressed TFs permutation"),
R50=c(run_r50_genesys('degree_centrality'),run_r50_genesys('out_centrality'),run_r50_genesys('in_centrality'),
run_r50_genesys('betweenness_centrality'),run_r50_genesys('closeness_centrality'),run_r50_genesys('eigenvector_centrality'),
run_r50_celloracle('degree_centrality'),run_r50_celloracle('out_centrality'),run_r50_celloracle('in_centrality'),
run_r50_celloracle('betweenness_centrality'),run_r50_celloracle('closeness_centrality'),run_r50_celloracle('eigenvector_centrality'),
999,999,999, mean(R50_permutation)))
toplt
| Methods | R50 |
|---|---|
| <chr> | <dbl> |
| GeneSys degree centrality | 267.000 |
| GeneSys out centrality | 244.000 |
| GeneSys in centrality | 228.000 |
| GeneSys betweenness centrality | 325.000 |
| GeneSys closeness centrality | 398.000 |
| GeneSys eigenvector centrality | 278.000 |
| CellOracle degree centrality | 508.000 |
| CellOracle out centrality | 476.000 |
| CellOracle in centrality | 425.000 |
| CellOracle betweenness centrality | 339.000 |
| CellOracle closeness centrality | 449.000 |
| CellOracle eigenvector centrality | 501.000 |
| DE myAUC rank | 999.000 |
| DE pct diff rank | 999.000 |
| DE avg diff rank | 999.000 |
| Expressed TFs permutation | 723.912 |
options(repr.plot.width=12, repr.plot.height=8)
ggplot(toplt, aes(x=reorder(Methods, R50, decreasing = TRUE), y=R50)) + geom_point(size=4)+
labs(title="Trichoblast-specific TF Prioritization Performance (R50)",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
toplt <- data.frame(Methods=factor(c(rep("GeneSys",6), rep("CellOracle",6), rep("DE",3), "Expressed TFs permutation"),
levels=c("DE","Expressed TFs permutation", "CellOracle", "GeneSys")), R50=toplt$R50)
options(repr.plot.width=9.5, repr.plot.height=6)
ggplot(toplt, aes(x=Methods, y=R50))+
geom_boxplot(width=0.3)+
labs(title="Trichoblast-specific TF Prioritization Performance",x="", y = "R50")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
dat <- genesys
plot_heatmap <- function(gene, centrality){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = TRUE, name = paste0(gene,"\n","weighted","\n","network","\n","centrality"),
col = col_fun, column_title = paste0(str_split_i(centrality,"_",1),"\n",str_split_i(centrality,"_",2)), column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_heatmap2 <- function(gene, centrality){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title = "out degree \n centrality", column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_heatmap3 <- function(gene, centrality){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep(centrality,colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1), name = paste0("unweighted","\n","network","\n","centrality"),
col = col_fun, column_title = "in degree \n centrality", column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_all_centrality <- function(gene){
options(repr.plot.width=10, repr.plot.height=6)
plot_heatmap(gene,"betweenness_centrality") + plot_heatmap2(gene,"out_centrality") + plot_heatmap3(gene,"in_centrality")
}
plot_all_centrality("TTG1")
plot_all_centrality("CPC")
plot_all_centrality("SHR")
plot_all_centrality("SCR")
plot_all_centrality("BLJ")
plot_all_centrality("JKD")
plot_all_centrality("MYB36")
plot_all_centrality("RVN")
plot_all_centrality("MGP")
plot_all_centrality("NUC")
plot_all_centrality("WER")
## HAT7
plot_all_centrality("HAT7")
## GATA10
plot_all_centrality("GATA10")
## GATA11
plot_all_centrality("GATA11")
plot_all_centrality("AN3")
plot_all_centrality("GL2")
plot_all_centrality <- function(gene){
options(repr.plot.width=8, repr.plot.height=4)
plot_heatmap(gene,"betweenness_centrality") + plot_heatmap2(gene,"out_centrality") + plot_heatmap3(gene,"in_centrality")
}
plot_all_centrality("SHR")
plot_all_centrality("WER")
plot_bc <- function(gene){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep("betweenness_centrality",colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_oc <- function(gene){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep("out_centrality",colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_ic <- function(gene){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep("in_centrality",colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_dc <- function(gene){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep("degree_centrality",colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title = gene, column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, bottom_annotation = HeatmapAnnotation(
text = anno_text(colnames(sub), rot = 60, location = unit(1, "npc"), just = "right"))
)
}
plot_blank <- function(gene){
sub <- as.numeric(t(dat[which(dat$TF==gene),grep("betweenness_centrality",colnames(dat))]))
sub <- as.matrix(cbind(sub[1:10],sub[11:20],sub[21:30],sub[31:40],sub[41:50]))
## Cell types
rownames(sub) <- c('Atrichoblast','Trichoblast','LRC','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Columella')
## Transition
colnames(sub) <- c('t0-t1', 't1-t3', 't3-t5', 't5-t7', 't7-t9')
# Reorder rows
sub <- sub[c(8,9,7,6,5,4,2,1,3,10),]
col_fun = colorRamp2(c(0, 0.001, 1), c('white',"white", "white"))
Heatmap(sub, rect_gp = gpar(col = "white", lwd = 1) , show_heatmap_legend = FALSE,
col = col_fun, column_title_gp = gpar(fontsize = 12, fontface = "bold"),
cluster_rows = FALSE, cluster_columns = FALSE,
show_column_names = FALSE, show_row_names = TRUE
)
}
# Combine the top three centralies
sub <- dat[,grep("betweenness_centrality|in_centrality|out_centrality",colnames(dat))]
sub <- as.data.frame(sapply(sub, as.numeric))
rownames(sub) <- dat$TF
head(sub)
| atri_out_centrality_1 | atri_in_centrality_1 | atri_betweenness_centrality_1 | tri_out_centrality_1 | tri_in_centrality_1 | tri_betweenness_centrality_1 | lrc_out_centrality_1 | lrc_in_centrality_1 | lrc_betweenness_centrality_1 | cor_out_centrality_1 | ... | pro_betweenness_centrality_5 | xyl_out_centrality_5 | xyl_in_centrality_5 | xyl_betweenness_centrality_5 | phl_out_centrality_5 | phl_in_centrality_5 | phl_betweenness_centrality_5 | col_out_centrality_5 | col_in_centrality_5 | col_betweenness_centrality_5 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | ... | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
| BZIP9 | 0.0000000 | 0.0000000 | 0.0000000 | 0.00000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.000000000 | ... | 1.0000000 | 0 | 0 | 0 | 0.7429245 | 0.88928151 | 0.08846168 | 0.00000000 | 0.000000000 | 0 |
| AT3G43430 | 0.0000000 | 0.0000000 | 0.0000000 | 0.00000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.002298851 | ... | 0.3216776 | 0 | 0 | 0 | 0.1450472 | 0.06831567 | 0.05658337 | 0.00000000 | 0.000000000 | 0 |
| HAT7 | 0.0000000 | 0.0000000 | 0.0000000 | 0.03813559 | 0.3274336 | 0.9204856 | 0.0000000 | 0.0000000 | 0.0000000 | 0.052873563 | ... | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0 |
| PLT1 | 0.9708738 | 0.6024845 | 0.9763135 | 0.00000000 | 0.0000000 | 0.0000000 | 0.3452055 | 1.0000000 | 0.9765895 | 0.696551724 | ... | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.00000000 | 0.00000000 | 0.07563025 | 0.003424658 | 0 |
| MYB36 | 0.0000000 | 0.0000000 | 0.0000000 | 0.00000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.0000000 | 0.050574713 | ... | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0 |
| GATA2 | 0.8284790 | 0.8012422 | 0.9985949 | 0.93644068 | 0.4424779 | 0.9416342 | 0.6739726 | 0.7235772 | 0.8874613 | 0.533333333 | ... | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0 |
bc_rank <- data.frame(all=rowSums(sub),atri=rowSums(sub[,grep("^atri_",colnames(sub))]),tri=rowSums(sub[,grep("^tri_",colnames(sub))])
,cor=rowSums(sub[,grep("^cor_",colnames(sub))]),end=rowSums(sub[,grep("^end_",colnames(sub))])
,per=rowSums(sub[,grep("^per_",colnames(sub))]),pro=rowSums(sub[,grep("^pro_",colnames(sub))])
,xyl=rowSums(sub[,grep("^xyl_",colnames(sub))]),phl=rowSums(sub[,grep("^phl_",colnames(sub))])
,lrc=rowSums(sub[,grep("^lrc_",colnames(sub))]),col=rowSums(sub[,grep("^col_",colnames(sub))]))
bc_rank$GeneID <- wanted_TFs$GeneID[match(rownames(bc_rank),wanted_TFs$Name)]
head(bc_rank)
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| BZIP9 | 31.71447 | 0.000000 | 0.000000 | 0.000000000 | 0.006698565 | 8.04635576 | 11.94430365 | 0.03622764 | 11.6808854 | 0.000000 | 0.000000 | AT5G24800 |
| AT3G43430 | 29.50134 | 0.000000 | 0.000000 | 0.005375774 | 0.006698565 | 8.92414305 | 10.03369110 | 3.50786160 | 7.0235724 | 0.000000 | 0.000000 | AT3G43430 |
| HAT7 | 32.32415 | 7.054065 | 5.626399 | 8.996598123 | 4.910315271 | 0.02122024 | 0.00000000 | 0.00000000 | 0.0000000 | 4.433060 | 1.282490 | AT5G15150 |
| PLT1 | 22.94342 | 3.573806 | 0.000000 | 2.592117793 | 1.958605076 | 0.00000000 | 0.00000000 | 0.00000000 | 0.0000000 | 9.283443 | 5.535445 | AT3G20840 |
| MYB36 | 19.51309 | 0.000000 | 0.000000 | 3.965572845 | 11.648226873 | 3.89929436 | 0.00000000 | 0.00000000 | 0.0000000 | 0.000000 | 0.000000 | AT5G57620 |
| GATA2 | 30.67747 | 7.853413 | 5.533161 | 2.445113736 | 1.382593066 | 0.50181676 | 0.08967606 | 0.05936252 | 0.4627788 | 10.404863 | 1.944695 | AT2G45050 |
atri_rank <- bc_rank[which(bc_rank$atri*2 > bc_rank$all),]%>% arrange(desc(atri))
atri_rank$GeneName <- rownames(atri_rank)
atri_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| TTG2 | 12.3474170 | 7.66213207 | 0.719954388 | 0.070557029 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 3.89477347 | 0.000000000 | AT2G37260 | TTG2 |
| GL2 | 14.2419328 | 7.27837845 | 1.626446914 | 0.181043761 | 0.014787481 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 5.14127622 | 0.000000000 | AT1G79840 | GL2 |
| ARR6 | 7.7177075 | 4.11180016 | 0.955805999 | 0.212809153 | 0.063140922 | 0.14839127 | 0.313312138 | 0.26656538 | 0.21309663 | 1.22045726 | 0.212328572 | AT5G62920 | ARR6 |
| IAA14 | 7.1650824 | 3.72877840 | 1.769875146 | 0.208928016 | 0.000000000 | 0.15855665 | 0.160679903 | 0.28307186 | 0.01423876 | 0.61522335 | 0.225730302 | AT4G14550 | IAA14 |
| CRF4 | 6.2276288 | 3.35877482 | 0.524429284 | 0.585671972 | 0.218314563 | 0.03942900 | 0.000000000 | 0.00000000 | 0.00000000 | 1.46415787 | 0.036851244 | AT4G27950 | CRF4 |
| FIT | 5.0340153 | 3.26960915 | 0.607038814 | 0.000000000 | 0.027304607 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 1.06085260 | 0.069210177 | AT2G28160 | FIT |
| OFP18 | 3.3119045 | 2.81438729 | 0.234187354 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.26332983 | 0.000000000 | AT3G52540 | OFP18 |
| HB17 | 3.8871110 | 2.02438629 | 0.344483774 | 0.081348655 | 0.002772068 | 0.00000000 | 0.000000000 | 1.37770801 | 0.02278912 | 0.03362309 | 0.000000000 | AT2G01430 | HB17 |
| KAN | 2.8694390 | 1.82819812 | 0.293676699 | 0.198726790 | 0.003827751 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.45494039 | 0.090069225 | AT5G16560 | KAN |
| HMGB2 | 2.9869944 | 1.64816144 | 0.270499677 | 0.317272183 | 0.175544976 | 0.13586765 | 0.189008472 | 0.00000000 | 0.20179388 | 0.01128584 | 0.037560325 | AT1G20693 | HMGB2 |
| BNQ3 | 2.7048052 | 1.63098882 | 0.142195361 | 0.010584029 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.88948145 | 0.031555541 | AT3G47710 | BNQ3 |
| RMR1 | 1.8702933 | 1.47893413 | 0.006941857 | 0.054330139 | 0.120451875 | 0.02217495 | 0.074434994 | 0.00000000 | 0.05393853 | 0.01684529 | 0.042241552 | AT5G66160 | RMR1 |
| NAC003 | 2.5357060 | 1.46480141 | 0.486766958 | 0.361627576 | 0.048125275 | 0.05701659 | 0.064006141 | 0.02969211 | 0.00000000 | 0.00000000 | 0.023669946 | AT1G02220 | NAC003 |
| LBD25 | 2.6371840 | 1.40021981 | 0.000000000 | 0.942467752 | 0.167708473 | 0.07299161 | 0.053796393 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | AT3G27650 | LBD25 |
| NAC044 | 2.4560336 | 1.29601271 | 0.222985777 | 0.226052725 | 0.122099221 | 0.55301055 | 0.000000000 | 0.00000000 | 0.00000000 | 0.03587259 | 0.000000000 | AT3G01600 | NAC044 |
| AIP2 | 2.3348480 | 1.24966354 | 0.200040411 | 0.117092771 | 0.147288489 | 0.06092371 | 0.191652548 | 0.00000000 | 0.23551228 | 0.07267386 | 0.060000383 | AT5G20910 | AIP2 |
| HB24 | 1.6039612 | 1.06343666 | 0.298545105 | 0.000000000 | 0.000000000 | 0.02311951 | 0.111068082 | 0.00000000 | 0.00000000 | 0.10779189 | 0.000000000 | AT2G18350 | HB24 |
| GIS3 | 0.6133367 | 0.51580487 | 0.020036430 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.07749544 | 0.000000000 | AT1G68360 | GIS3 |
| AT2G18850 | 0.6161074 | 0.32152796 | 0.039073046 | 0.095207781 | 0.051728851 | 0.05215583 | 0.000000000 | 0.00000000 | 0.00000000 | 0.03455879 | 0.021855148 | AT2G18850 | AT2G18850 |
| AT1G11490 | 0.4579165 | 0.24846511 | 0.186109392 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.02334204 | 0.000000000 | AT1G11490 | AT1G11490 |
| NLP4 | 0.3071536 | 0.20900779 | 0.050454629 | 0.000000000 | 0.002880584 | 0.00000000 | 0.000000000 | 0.00000000 | 0.02510829 | 0.01060519 | 0.009097158 | AT1G20640 | NLP4 |
| VFP5 | 0.2484859 | 0.13004092 | 0.000000000 | 0.060725022 | 0.000000000 | 0.02610951 | 0.007547768 | 0.00000000 | 0.00000000 | 0.01250398 | 0.011558680 | AT5G05550 | VFP5 |
| LBD26 | 0.1023420 | 0.05473178 | 0.026534531 | 0.008146673 | 0.000000000 | 0.00000000 | 0.000000000 | 0.00000000 | 0.00000000 | 0.00785531 | 0.005073673 | AT3G27940 | LBD26 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(atri_rank[1:10,], aes(x=reorder(GeneName, atri, decreasing = FALSE), y=atri)) + geom_point(size=4)+
labs(title="Atrichoblast-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(atri_rank,"Atrichoblast_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- atri_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Atrichoblast ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])
q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))
options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
tri_rank <- bc_rank[which(bc_rank$tri*2 > bc_rank$all),]%>% arrange(desc(tri))
tri_rank$GeneName <- rownames(tri_rank)
tri_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| AT3G53370 | 10.51332469 | 1.70510135 | 8.05305024 | 0.000000000 | 0.000000000 | 0.104263060 | 0.187801694 | 0.39737571 | 0.065732646 | 0.000000000 | 0.000000000 | AT3G53370 | AT3G53370 |
| RHD6 | 11.22573826 | 3.85916008 | 7.36657818 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G66470 | RHD6 |
| WRKY65 | 8.65562962 | 1.38668348 | 4.36361919 | 0.011697506 | 0.197702082 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.613232755 | 1.082694618 | AT1G29280 | WRKY65 |
| AT2G37120 | 6.29357775 | 0.93726369 | 3.76273932 | 0.104956333 | 0.177723679 | 0.101358153 | 0.007651672 | 0.80997145 | 0.192670974 | 0.199242466 | 0.000000000 | AT2G37120 | AT2G37120 |
| tny | 4.87767163 | 0.02922657 | 2.68223400 | 2.104674337 | 0.021349860 | 0.000000000 | 0.040186868 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G25810 | tny |
| WRKY70 | 3.17128234 | 0.67219042 | 1.80645903 | 0.000000000 | 0.000000000 | 0.069130162 | 0.062103032 | 0.00000000 | 0.027210884 | 0.202466927 | 0.331721889 | AT3G56400 | WRKY70 |
| AT4G39160 | 1.71652375 | 0.23754052 | 1.35605000 | 0.000000000 | 0.013519256 | 0.050989155 | 0.002159837 | 0.00000000 | 0.012332391 | 0.005735605 | 0.038196982 | AT4G39160 | AT4G39160 |
| GL3 | 1.11211635 | 0.27241212 | 0.75079177 | 0.088912467 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G41315 | GL3 |
| RL6 | 0.65680222 | 0.05712800 | 0.55397474 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.015223153 | 0.030476328 | 0.000000000 | AT1G75250 | RL6 |
| SUVR4 | 0.53241418 | 0.05081569 | 0.38315817 | 0.006152709 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.030393140 | 0.061894477 | AT3G04380 | SUVR4 |
| bZIP23 | 0.64750855 | 0.01526386 | 0.32446092 | 0.054429708 | 0.016591570 | 0.039091346 | 0.025490165 | 0.00000000 | 0.140227289 | 0.017206816 | 0.014746876 | AT2G16770 | bZIP23 |
| AT2G37000 | 0.34981598 | 0.06302639 | 0.24651267 | 0.008452697 | 0.000000000 | 0.028949327 | 0.002874891 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT2G37000 | AT2G37000 |
| BPC5 | 0.19254110 | 0.01605057 | 0.17649053 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT4G38910 | BPC5 |
| FRF1 | 0.18451513 | 0.00000000 | 0.10454207 | 0.000000000 | 0.029962971 | 0.007096562 | 0.011011325 | 0.00000000 | 0.005558887 | 0.007105468 | 0.019237845 | AT3G59470 | FRF1 |
| ASG3 | 0.14783754 | 0.02176621 | 0.09874421 | 0.000000000 | 0.002870813 | 0.004888947 | 0.016119924 | 0.00000000 | 0.000000000 | 0.000000000 | 0.003447441 | AT2G44980 | ASG3 |
| AT2G19380 | 0.11059372 | 0.00000000 | 0.07006888 | 0.000000000 | 0.003827751 | 0.000000000 | 0.004199394 | 0.00000000 | 0.019981905 | 0.000000000 | 0.012515794 | AT2G19380 | AT2G19380 |
| AGL87 | 0.07581457 | 0.00000000 | 0.06124772 | 0.014566850 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G22590 | AGL87 |
| AT5G06420 | 0.09232181 | 0.00000000 | 0.04905872 | 0.000000000 | 0.022196290 | 0.003528344 | 0.002159837 | 0.01317961 | 0.002199011 | 0.000000000 | 0.000000000 | AT5G06420 | AT5G06420 |
| PIL6 | 0.02984851 | 0.00000000 | 0.02984851 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G59060 | PIL6 |
| SUVH2 | 0.04308673 | 0.00000000 | 0.02496555 | 0.000000000 | 0.003827751 | 0.012133589 | 0.002159837 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT2G33290 | SUVH2 |
| LDL2 | 0.02982666 | 0.00000000 | 0.02047501 | 0.000000000 | 0.003827751 | 0.000000000 | 0.005523898 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G13682 | LDL2 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(tri_rank[1:10,], aes(x=reorder(GeneName, tri, decreasing = FALSE), y=tri)) + geom_point(size=4)+
labs(title="Trichoblast-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(tri_rank,"Trichoblast_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
## Top20 only
tf_rank <- tri_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Trichoblast ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])
q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))
options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
cor_rank <- bc_rank[which(bc_rank$cor*2 > bc_rank$all),]%>% arrange(desc(cor))
cor_rank$GeneName <- rownames(cor_rank)
cor_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| JKD | 8.2396085 | 0.0000000 | 0.0000000 | 5.358894391 | 2.720061321 | 0.000000000 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.160652759 | AT5G03150 | JKD |
| AT1G05710 | 6.1268177 | 0.0000000 | 0.0000000 | 4.414423648 | 1.670630776 | 0.036239355 | 0.005523898 | 0 | 0.000000000 | 0.00000000 | 0.000000000 | AT1G05710 | AT1G05710 |
| AT1G72210 | 4.3978702 | 0.0000000 | 0.0000000 | 3.326076849 | 0.910060583 | 0.002360119 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.159372610 | AT1G72210 | AT1G72210 |
| AT2G38300 | 3.1103756 | 0.0000000 | 0.0000000 | 2.585956800 | 0.413422249 | 0.000000000 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.110996559 | AT2G38300 | AT2G38300 |
| JAZ6 | 2.0371642 | 0.1452226 | 0.0678334 | 1.522800605 | 0.175564432 | 0.055974677 | 0.048367608 | 0 | 0.004556113 | 0.00000000 | 0.016844717 | AT1G72450 | JAZ6 |
| IDD4 | 1.7400502 | 0.0000000 | 0.0000000 | 1.348173725 | 0.379331910 | 0.000000000 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.012544599 | AT2G02080 | IDD4 |
| LRP1 | 2.2433905 | 0.0000000 | 0.0000000 | 1.347436802 | 0.264705777 | 0.315998738 | 0.275261648 | 0 | 0.000000000 | 0.00000000 | 0.039987577 | AT5G12330 | LRP1 |
| AT2G42660 | 1.5349520 | 0.0000000 | 0.0000000 | 1.337205769 | 0.000000000 | 0.000000000 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.197746268 | AT2G42660 | AT2G42660 |
| ERF15 | 1.8318405 | 0.0000000 | 0.0000000 | 0.930032857 | 0.897259103 | 0.000000000 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.004548579 | AT2G31230 | ERF15 |
| GLK2 | 1.0971457 | 0.0000000 | 0.0000000 | 0.791132583 | 0.002870813 | 0.078401208 | 0.169211121 | 0 | 0.055530008 | 0.00000000 | 0.000000000 | AT5G44190 | GLK2 |
| ETR2 | 1.0127513 | 0.1235738 | 0.0000000 | 0.543954890 | 0.159645060 | 0.000000000 | 0.002874891 | 0 | 0.000000000 | 0.02489294 | 0.157809818 | AT3G23150 | ETR2 |
| AT3G18960 | 0.1780973 | 0.0000000 | 0.0000000 | 0.157046686 | 0.000000000 | 0.005202625 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.015848014 | AT3G18960 | AT3G18960 |
| AT2G46810 | 0.1968659 | 0.0000000 | 0.0000000 | 0.109681370 | 0.017377911 | 0.000000000 | 0.007909619 | 0 | 0.000000000 | 0.00000000 | 0.061896990 | AT2G46810 | AT2G46810 |
| HSFC1 | 0.1935138 | 0.0000000 | 0.0000000 | 0.101184792 | 0.000000000 | 0.049610987 | 0.022321474 | 0 | 0.000000000 | 0.00000000 | 0.020396593 | AT3G24520 | HSFC1 |
| AT3G04450 | 0.0125023 | 0.0000000 | 0.0000000 | 0.009973475 | 0.000000000 | 0.002528828 | 0.000000000 | 0 | 0.000000000 | 0.00000000 | 0.000000000 | AT3G04450 | AT3G04450 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(cor_rank[1:10,], aes(x=reorder(GeneName, cor, decreasing = FALSE), y=cor)) + geom_point(size=4)+
labs(title="Cortex-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(cor_rank,"Cortex_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- cor_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=9)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Cortex ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,nrow=3),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,nrow=3),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,nrow=3),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
## Top 10 only
tf_rank <- cor_rank %>% rownames(.)
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
#p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
#p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
#p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_blank("Empty")+ plot_blank("Empty") + plot_blank("Empty")+ plot_blank("Empty")
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
#p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
#p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
#p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=5)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Cortex ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,nrow=2),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,nrow=2),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,nrow=2),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])
q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))
options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
end_rank <- bc_rank[which(bc_rank$end*2 > bc_rank$all),]%>% arrange(desc(end))
end_rank$GeneName <- rownames(end_rank)
end_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| MYB36 | 19.51309408 | 0.00000000 | 0.000000000 | 3.96557285 | 11.64822687 | 3.899294360 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G57620 | MYB36 |
| MYB74 | 10.57984718 | 0.00000000 | 0.000000000 | 1.79339769 | 7.04070607 | 1.432723885 | 0.006848401 | 0.30617114 | 0.000000000 | 0.000000000 | 0.000000000 | AT4G05100 | MYB74 |
| MYB68 | 7.95738692 | 0.00000000 | 0.000000000 | 1.46239238 | 6.21188064 | 0.283113908 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G65790 | MYB68 |
| SOM | 6.91590076 | 0.31147119 | 0.000000000 | 1.00295479 | 4.67445399 | 0.647166979 | 0.234669337 | 0.00000000 | 0.045184473 | 0.000000000 | 0.000000000 | AT1G03790 | SOM |
| RAX2 | 5.93069125 | 0.35644137 | 0.034200666 | 1.20469945 | 3.94113761 | 0.353927368 | 0.000000000 | 0.00000000 | 0.000000000 | 0.040284772 | 0.000000000 | AT2G36890 | RAX2 |
| BLJ | 4.39923249 | 0.00000000 | 0.000000000 | 0.56360296 | 3.60218449 | 0.233445030 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G14580 | BLJ |
| SCR | 4.82269115 | 0.00000000 | 0.000000000 | 1.82554739 | 2.99714375 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G54220 | SCR |
| TLP11 | 4.12025319 | 0.00000000 | 0.306172801 | 0.05100626 | 2.52513167 | 0.398776753 | 0.424594941 | 0.00000000 | 0.414570765 | 0.000000000 | 0.000000000 | AT5G18680 | TLP11 |
| bZIP58 | 1.71582983 | 0.00000000 | 0.000000000 | 0.00000000 | 1.57178222 | 0.070008903 | 0.074038708 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G13600 | bZIP58 |
| BIB | 1.26649446 | 0.00000000 | 0.000000000 | 0.07143260 | 1.19506186 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G45260 | BIB |
| RVN | 1.42678596 | 0.00000000 | 0.000000000 | 0.45433505 | 0.93783821 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.034612694 | AT2G02070 | RVN |
| MYB122 | 1.60487937 | 0.00000000 | 0.000000000 | 0.59238242 | 0.93547619 | 0.027500767 | 0.049519996 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G74080 | MYB122 |
| AT5G41920 | 0.94031384 | 0.00000000 | 0.000000000 | 0.08146738 | 0.85884646 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G41920 | AT5G41920 |
| AGL42 | 1.11052158 | 0.00000000 | 0.000000000 | 0.31676231 | 0.68784316 | 0.057906983 | 0.048009118 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G62165 | AGL42 |
| AT2G43140 | 0.77722377 | 0.00000000 | 0.000000000 | 0.10404195 | 0.67318183 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT2G43140 | AT2G43140 |
| ERF10 | 0.86308851 | 0.00000000 | 0.000000000 | 0.05534925 | 0.43302329 | 0.260388978 | 0.091257251 | 0.02306974 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G03800 | ERF10 |
| MYB70 | 0.63684752 | 0.03874335 | 0.003870674 | 0.10466428 | 0.34489513 | 0.025011951 | 0.042716418 | 0.00000000 | 0.000000000 | 0.022430115 | 0.054515598 | AT2G23290 | MYB70 |
| TIFY8 | 0.38923606 | 0.00000000 | 0.000000000 | 0.00000000 | 0.27255040 | 0.005647096 | 0.000000000 | 0.00000000 | 0.000000000 | 0.074741062 | 0.036297497 | AT4G32570 | TIFY8 |
| SIGA | 0.33795007 | 0.00000000 | 0.000000000 | 0.03117682 | 0.25300666 | 0.035158070 | 0.011747163 | 0.00000000 | 0.000000000 | 0.000000000 | 0.006861356 | AT1G64860 | SIGA |
| AT3G07500 | 0.18825577 | 0.00000000 | 0.000000000 | 0.02836428 | 0.12076017 | 0.039131317 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G07500 | AT3G07500 |
| ERF73 | 0.14563708 | 0.00000000 | 0.000000000 | 0.00000000 | 0.11294226 | 0.007132812 | 0.008398788 | 0.00000000 | 0.000000000 | 0.008422647 | 0.008740567 | AT1G72360 | ERF73 |
| FAR1 | 0.20489065 | 0.00000000 | 0.000000000 | 0.01706306 | 0.11233473 | 0.028666213 | 0.015927228 | 0.00000000 | 0.004556113 | 0.007105468 | 0.019237845 | AT4G15090 | FAR1 |
| AT4G08455 | 0.14788778 | 0.00000000 | 0.021608650 | 0.00000000 | 0.07688595 | 0.025665449 | 0.019171624 | 0.00000000 | 0.004556113 | 0.000000000 | 0.000000000 | AT4G08455 | AT4G08455 |
| TCP9 | 0.09886033 | 0.00000000 | 0.000000000 | 0.00000000 | 0.05387220 | 0.000000000 | 0.002159837 | 0.04282830 | 0.000000000 | 0.000000000 | 0.000000000 | AT2G45680 | TCP9 |
| AT4G00390 | 0.06972115 | 0.00000000 | 0.000000000 | 0.02072502 | 0.04899612 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT4G00390 | AT4G00390 |
| AT3G01890 | 0.07500588 | 0.00000000 | 0.030223489 | 0.00000000 | 0.04154497 | 0.000000000 | 0.003237423 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G01890 | AT3G01890 |
| AT1G61970 | 0.07083045 | 0.00000000 | 0.000000000 | 0.00000000 | 0.03913811 | 0.004736403 | 0.009949176 | 0.00000000 | 0.000000000 | 0.000000000 | 0.017006763 | AT1G61970 | AT1G61970 |
| NF-YA6 | 0.04945440 | 0.00000000 | 0.000000000 | 0.00000000 | 0.03325970 | 0.011769419 | 0.004425279 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G14020 | NF-YA6 |
options(repr.plot.width=8, repr.plot.height=4)
ggplot(end_rank[1:10,], aes(x=reorder(GeneName, end, decreasing = FALSE), y=end)) + geom_point(size=4)+
labs(title="Endodermis-specific TF Prioritization",x="", y = "Combined centrality score (betweeness, out and in degree)")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(end_rank,"Endodermis_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- end_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Endodermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
tf_rank <- end_rank %>% rownames(.)
# Max 10
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
#p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
#p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
#p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
#p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
#p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
#p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
#p3 <- grid.grabExpr(draw(p3))
#p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
#p7 <- grid.grabExpr(draw(p7))
#p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
#p11 <- grid.grabExpr(draw(p11))
#p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=5)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Endodermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,nrow=2),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,nrow=2),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,nrow=2),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5]) + plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5]) + plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5]) + plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))
options(repr.plot.width=16, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
per_rank <- bc_rank[which(bc_rank$per*2 > bc_rank$all),]%>% arrange(desc(per))
per_rank$GeneName <- rownames(per_rank)
per_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| MYBC1 | 13.63866508 | 0.00000000 | 0.00000000 | 0.45338769 | 2.143205062 | 9.00661080 | 1.794287688 | 0.00000000 | 0.24117383 | 0.000000000 | 0.000000000 | AT2G40970 | MYBC1 |
| LBD16 | 7.82135600 | 0.00000000 | 0.00000000 | 0.11658626 | 0.174778877 | 4.15706614 | 3.073922149 | 0.00000000 | 0.29900256 | 0.000000000 | 0.000000000 | AT2G42430 | LBD16 |
| LBD14 | 4.16771007 | 0.00000000 | 0.00000000 | 0.05761273 | 0.036996037 | 3.83815074 | 0.234950563 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT2G31310 | LBD14 |
| SAP | 4.26388507 | 0.13255543 | 0.00000000 | 0.24218919 | 0.160135518 | 3.62269558 | 0.106309359 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT5G35770 | SAP |
| NUC | 5.55906804 | 0.00000000 | 0.00000000 | 0.47189966 | 0.000000000 | 3.61382214 | 0.649976803 | 0.00000000 | 0.81993876 | 0.000000000 | 0.003430678 | AT5G44160 | NUC |
| AT3G21330 | 5.65980461 | 0.16912726 | 0.00000000 | 0.55388195 | 0.565696008 | 3.42748431 | 0.943615086 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT3G21330 | AT3G21330 |
| IDD11 | 4.27563103 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 3.28891496 | 0.986716077 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT3G13810 | IDD11 |
| MGP | 4.46285753 | 0.00000000 | 0.00000000 | 0.74208303 | 0.133264999 | 3.05244123 | 0.535068272 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT1G03840 | MGP |
| AT2G14880 | 3.66710161 | 0.54757196 | 0.01751162 | 0.12005362 | 0.305700697 | 2.38140484 | 0.272684904 | 0.00000000 | 0.00000000 | 0.022173961 | 0.000000000 | AT2G14880 | AT2G14880 |
| GATA23 | 2.88800573 | 0.00000000 | 0.00000000 | 0.00000000 | 0.009735856 | 2.13472979 | 0.743540082 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT5G26930 | GATA23 |
| AT2G20100 | 2.96560299 | 0.00000000 | 0.00000000 | 0.02380195 | 0.002870813 | 1.66967546 | 0.602056199 | 0.66719857 | 0.00000000 | 0.000000000 | 0.000000000 | AT2G20100 | AT2G20100 |
| GRF9 | 1.10320281 | 0.15027438 | 0.03851057 | 0.01842617 | 0.052197705 | 0.59273823 | 0.251055752 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT2G45480 | GRF9 |
| NAGS2 | 0.84934059 | 0.04517679 | 0.00000000 | 0.03147657 | 0.042711632 | 0.43134050 | 0.188716445 | 0.01319046 | 0.07687075 | 0.019857445 | 0.000000000 | AT4G37670 | NAGS2 |
| LBD29 | 0.42833314 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.22043352 | 0.207899617 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT3G58190 | LBD29 |
| AT1G78930 | 0.16574737 | 0.00000000 | 0.00000000 | 0.00000000 | 0.003827751 | 0.12865794 | 0.027526077 | 0.00000000 | 0.00000000 | 0.005735605 | 0.000000000 | AT1G78930 | AT1G78930 |
| BOP2 | 0.16720625 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.11416451 | 0.053041737 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT2G41370 | BOP2 |
| AT4G31060 | 0.09506851 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.06726357 | 0.006359232 | 0.00000000 | 0.01134436 | 0.010101348 | 0.000000000 | AT4G31060 | AT4G31060 |
| AT3G61550 | 0.10490425 | 0.00000000 | 0.00000000 | 0.04445623 | 0.000000000 | 0.05745213 | 0.000000000 | 0.00000000 | 0.00000000 | 0.002995879 | 0.000000000 | AT3G61550 | AT3G61550 |
| AT1G24210 | 0.09631176 | 0.00000000 | 0.00000000 | 0.00000000 | 0.004784689 | 0.05536655 | 0.036160516 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT1G24210 | AT1G24210 |
| AT1G68030 | 0.03309547 | 0.00000000 | 0.00000000 | 0.00000000 | 0.003827751 | 0.01802314 | 0.011244577 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT1G68030 | AT1G68030 |
| PRR3 | 0.01033083 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.01033083 | 0.000000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | AT5G60100 | PRR3 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(per_rank[1:10,], aes(x=reorder(GeneName, per, decreasing = FALSE), y=per)) + geom_point(size=4)+
labs(title="Pericycle-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(per_rank,"Pericycle_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- per_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Pericycle ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
q1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3])
q2 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3])
q3 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3])
q1 <- grid.grabExpr(draw(q1))
q2 <- grid.grabExpr(draw(q2))
q3 <- grid.grabExpr(draw(q3))
options(repr.plot.width=6, repr.plot.height=8)
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q1,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q2,nrow=2,rel_heights = c(1, 8))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),q3,nrow=2,rel_heights = c(1, 8)),nrow=3)
pro_rank <- bc_rank[which(bc_rank$pro*2 > bc_rank$all),]%>% arrange(desc(pro))
pro_rank$GeneName <- rownames(pro_rank)
pro_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| IAA28 | 13.7612975 | 0.1894170 | 0.073915073 | 0.532529533 | 0.318490933 | 0.71275472 | 7.06383265 | 0.8391969 | 4.031160765 | 0.000000000 | 0.000000000 | AT5G25890 | IAA28 |
| ABO3 | 11.6856561 | 0.2128955 | 0.009809774 | 0.029197080 | 0.111201150 | 4.32810648 | 6.13141112 | 0.1753614 | 0.687673543 | 0.000000000 | 0.000000000 | AT1G66600 | ABO3 |
| IDD14 | 6.2086688 | 0.0000000 | 0.000000000 | 0.000000000 | 0.070188675 | 1.55017977 | 3.11049066 | 0.3265915 | 1.151218201 | 0.000000000 | 0.000000000 | AT1G68130 | IDD14 |
| HAT9 | 5.5698182 | 0.0000000 | 0.020664199 | 0.025932810 | 0.011483254 | 2.26225702 | 3.01849618 | 0.0000000 | 0.230984762 | 0.000000000 | 0.000000000 | AT2G22800 | HAT9 |
| ERF12 | 4.6778600 | 0.0000000 | 0.000000000 | 0.000000000 | 0.015311005 | 1.64645212 | 2.54169873 | 0.0000000 | 0.474398163 | 0.000000000 | 0.000000000 | AT1G28360 | ERF12 |
| AT1G75490 | 2.1074593 | 0.0000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.13661200 | 1.66707941 | 0.0000000 | 0.303767886 | 0.000000000 | 0.000000000 | AT1G75490 | AT1G75490 |
| HB18 | 1.8519702 | 0.0000000 | 0.000000000 | 0.000000000 | 0.004784689 | 0.18242039 | 1.47025793 | 0.0000000 | 0.194507235 | 0.000000000 | 0.000000000 | AT1G70920 | HB18 |
| AT2G40200 | 2.0720869 | 0.0000000 | 0.000000000 | 0.005375774 | 0.000000000 | 0.23731271 | 1.42836811 | 0.0000000 | 0.401030320 | 0.000000000 | 0.000000000 | AT2G40200 | AT2G40200 |
| NAC080 | 1.8683555 | 0.0000000 | 0.000000000 | 0.000000000 | 0.006698565 | 0.33656391 | 1.23911258 | 0.0000000 | 0.270348053 | 0.008422647 | 0.007209796 | AT5G07680 | NAC080 |
| SHY2 | 1.9905026 | 0.0000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.08385465 | 1.21982592 | 0.2089959 | 0.477826070 | 0.000000000 | 0.000000000 | AT1G04240 | SHY2 |
| AT4G20970 | 1.0004653 | 0.0000000 | 0.000000000 | 0.000000000 | 0.002870813 | 0.23559663 | 0.74337637 | 0.0000000 | 0.018621479 | 0.000000000 | 0.000000000 | AT4G20970 | AT4G20970 |
| AT4G27240 | 0.1608753 | 0.0000000 | 0.000000000 | 0.024544651 | 0.000000000 | 0.02317468 | 0.10327470 | 0.0000000 | 0.006462585 | 0.000000000 | 0.003418636 | AT4G27240 | AT4G27240 |
| FRS12 | 0.1570577 | 0.0000000 | 0.000000000 | 0.000000000 | 0.051518140 | 0.01373056 | 0.08500051 | 0.0000000 | 0.000000000 | 0.000000000 | 0.006808466 | AT5G18960 | FRS12 |
| DAR6 | 0.0945977 | 0.0000000 | 0.000000000 | 0.000000000 | 0.003827751 | 0.00000000 | 0.05792793 | 0.0000000 | 0.000000000 | 0.000000000 | 0.032842019 | AT5G66620 | DAR6 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(pro_rank[1:10,], aes(x=reorder(GeneName, pro, decreasing = FALSE), y=pro)) + geom_point(size=4)+
labs(title="Procambium-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(pro_rank,"Procambium_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- pro_rank %>% rownames(.)
# Max 30
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_blank(tf_rank[15])
p4 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p5 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p6 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_blank(tf_rank[15])
p7 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p8 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p9 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_blank(tf_rank[15])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=10)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Procambium ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,nrow=3),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p4,p5,p6,nrow=3),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p7,p8,p9,nrow=3),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
phl_rank <- bc_rank[which(bc_rank$phl*2 > bc_rank$all),]%>% arrange(desc(phl))
phl_rank$GeneName <- rownames(phl_rank)
phl_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| APL | 18.6229618 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.265907639 | 2.495922354 | 1.641531332 | 13.21960051 | 0.000000000 | 0.000000000 | AT1G79430 | APL |
| OBP2 | 19.5573254 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 3.989014385 | 4.430147678 | 0.000000000 | 11.13816336 | 0.000000000 | 0.000000000 | AT1G07640 | OBP2 |
| AT3G12730 | 10.4310407 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.929487640 | 0.211938642 | 0.000000000 | 9.28961440 | 0.000000000 | 0.000000000 | AT3G12730 | AT3G12730 |
| DAR2 | 10.5373864 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.202522452 | 1.263778973 | 0.465563161 | 8.60552182 | 0.000000000 | 0.000000000 | AT2G39830 | DAR2 |
| AT2G03500 | 9.9853427 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.766498483 | 0.437397254 | 0.235024550 | 8.54642243 | 0.000000000 | 0.000000000 | AT2G03500 | AT2G03500 |
| DOF6 | 11.3168709 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.581244409 | 0.354212657 | 2.053785270 | 8.32762854 | 0.000000000 | 0.000000000 | AT3G45610 | DOF6 |
| NAC057 | 7.2796075 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.050659720 | 0.163432843 | 0.520738836 | 6.54477611 | 0.000000000 | 0.000000000 | AT3G17730 | NAC057 |
| HCA2 | 7.1364223 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.141976234 | 0.138924581 | 0.482277297 | 6.37324420 | 0.000000000 | 0.000000000 | AT5G62940 | HCA2 |
| AT2G44940 | 9.1179088 | 0.00000000 | 0.000000000 | 0.00000000 | 0.060890108 | 1.202172996 | 1.547308685 | 0.000000000 | 6.30753700 | 0.000000000 | 0.000000000 | AT2G44940 | AT2G44940 |
| AT5G41380 | 5.6560690 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.016591848 | 0.038171909 | 0.000000000 | 5.60130528 | 0.000000000 | 0.000000000 | AT5G41380 | AT5G41380 |
| AT2G28810 | 8.7586296 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.228165412 | 1.953536345 | 0.026359215 | 5.55056866 | 0.000000000 | 0.000000000 | AT2G28810 | AT2G28810 |
| AT4G37180 | 6.4796802 | 0.00000000 | 0.013971734 | 0.00000000 | 0.041868597 | 0.179018067 | 0.245277121 | 0.176848121 | 5.43093195 | 0.093830048 | 0.297934576 | AT4G37180 | AT4G37180 |
| NAC020 | 5.6712996 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.072410927 | 0.353897183 | 0.000000000 | 5.24499146 | 0.000000000 | 0.000000000 | AT1G54330 | NAC020 |
| AT1G49560 | 6.6056960 | 0.29307780 | 0.000000000 | 0.34341364 | 0.363703622 | 0.010438153 | 0.143665940 | 0.346042646 | 4.60125754 | 0.219171301 | 0.284925398 | AT1G49560 | AT1G49560 |
| REM22 | 4.3919838 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.003528344 | 0.163612008 | 0.000000000 | 4.22484340 | 0.000000000 | 0.000000000 | AT3G17010 | REM22 |
| DOF2.4 | 7.5188911 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.214999301 | 2.126565035 | 0.000000000 | 4.17732673 | 0.000000000 | 0.000000000 | AT2G37590 | DOF2.4 |
| AT1G63820 | 5.2567575 | 0.00000000 | 0.000000000 | 0.00000000 | 0.006599819 | 0.753516474 | 0.408906313 | 0.000000000 | 4.08773490 | 0.000000000 | 0.000000000 | AT1G63820 | AT1G63820 |
| AT5G02460 | 4.2293313 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.086242755 | 0.192938556 | 0.000000000 | 3.95015003 | 0.000000000 | 0.000000000 | AT5G02460 | AT5G02460 |
| NAC2 | 4.4214728 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.192505456 | 0.279765561 | 0.000000000 | 3.94920179 | 0.000000000 | 0.000000000 | AT3G15510 | NAC2 |
| CRF1 | 5.4657129 | 0.32106873 | 0.085120744 | 0.25018568 | 0.236845702 | 0.113509568 | 0.097596610 | 0.000000000 | 3.88966379 | 0.359865948 | 0.111856089 | AT4G11140 | CRF1 |
| AT2G28510 | 7.2298500 | 0.00000000 | 0.000000000 | 0.01916888 | 0.266916043 | 0.977086168 | 2.130936764 | 0.046193764 | 3.78954843 | 0.000000000 | 0.000000000 | AT2G28510 | AT2G28510 |
| GATA20 | 3.7301836 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.011729585 | 0.063373751 | 0.000000000 | 3.65508027 | 0.000000000 | 0.000000000 | AT2G18380 | GATA20 |
| FLP | 5.8700418 | 0.35716057 | 0.000000000 | 0.24435013 | 0.044307776 | 0.062689989 | 0.177747204 | 0.000000000 | 3.25311039 | 1.441740728 | 0.288935003 | AT1G14350 | FLP |
| AT5G63700 | 3.5044795 | 0.00000000 | 0.000000000 | 0.48634884 | 0.000000000 | 0.000000000 | 0.008172904 | 0.000000000 | 2.87521984 | 0.000000000 | 0.134737917 | AT5G63700 | AT5G63700 |
| bZIP44 | 5.3854736 | 0.05706981 | 0.056660403 | 0.05859384 | 0.165572064 | 1.278097977 | 0.763682922 | 0.204511899 | 2.80128473 | 0.000000000 | 0.000000000 | AT1G75390 | bZIP44 |
| AT1G26790 | 3.1080048 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.009464148 | 0.560694982 | 0.000000000 | 2.53784572 | 0.000000000 | 0.000000000 | AT1G26790 | AT1G26790 |
| KNAT2 | 2.8581101 | 0.00000000 | 0.000000000 | 0.04074271 | 0.286151817 | 0.000000000 | 0.065623255 | 0.000000000 | 2.46559236 | 0.000000000 | 0.000000000 | AT1G70510 | KNAT2 |
| AT1G28310 | 4.3372161 | 0.00000000 | 0.000000000 | 0.00000000 | 0.638640043 | 0.439318279 | 0.974659200 | 0.000000000 | 2.28459859 | 0.000000000 | 0.000000000 | AT1G28310 | AT1G28310 |
| AGL15 | 2.1996263 | 0.00000000 | 0.000000000 | 0.00000000 | 0.004784689 | 0.007080358 | 0.032419989 | 0.000000000 | 2.15534125 | 0.000000000 | 0.000000000 | AT5G13790 | AGL15 |
| WRKY21 | 3.5813006 | 0.00000000 | 0.000000000 | 0.02874896 | 0.100010201 | 0.410844223 | 0.737779073 | 0.000000000 | 2.08822908 | 0.094816356 | 0.120872667 | AT2G30590 | WRKY21 |
| bZIP19 | 3.5462178 | 0.15967329 | 0.008611306 | 0.02702090 | 0.098726261 | 0.415048119 | 0.827613182 | 0.000000000 | 2.00952469 | 0.000000000 | 0.000000000 | AT4G35040 | bZIP19 |
| NAC086 | 1.9759534 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 1.97595337 | 0.000000000 | 0.000000000 | AT5G17260 | NAC086 |
| WRKY32 | 2.9820206 | 0.00000000 | 0.000000000 | 0.00000000 | 0.051972540 | 0.471563276 | 0.443035057 | 0.000000000 | 1.92765707 | 0.043956760 | 0.043835858 | AT4G30935 | WRKY32 |
| VOZ1 | 3.0449548 | 0.00000000 | 0.000000000 | 0.00000000 | 0.034747660 | 0.401000225 | 0.470980827 | 0.179972277 | 1.89158202 | 0.027375281 | 0.039296518 | AT1G28520 | VOZ1 |
| SVP | 1.9221346 | 0.04802107 | 0.000000000 | 0.01998232 | 0.000000000 | 0.066273969 | 0.058390856 | 0.000000000 | 1.71697942 | 0.000000000 | 0.012486989 | AT2G22540 | SVP |
| CDF3 | 2.8630256 | 0.00000000 | 0.000000000 | 0.00000000 | 0.005741627 | 0.381991751 | 0.837228711 | 0.000000000 | 1.62410873 | 0.013954783 | 0.000000000 | AT3G47500 | CDF3 |
| AS1 | 3.1581149 | 0.01039264 | 0.000000000 | 0.09551257 | 0.000000000 | 0.161418109 | 0.517381856 | 0.738659628 | 1.58558170 | 0.000000000 | 0.049168432 | AT2G37630 | AS1 |
| ROS4 | 2.6253138 | 0.01040465 | 0.037340619 | 0.02938081 | 0.063401895 | 0.182997662 | 0.436897616 | 0.362612906 | 1.44570769 | 0.029817125 | 0.026752804 | AT3G14980 | ROS4 |
| AT1G47570 | 2.4471694 | 0.02186979 | 0.060678768 | 0.04215738 | 0.002870813 | 0.175520259 | 0.126976638 | 0.745774195 | 1.23502201 | 0.024913687 | 0.011385850 | AT1G47570 | AT1G47570 |
| NAC045 | 1.1691726 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.067350090 | 0.311972555 | 0.000000000 | 0.78984996 | 0.000000000 | 0.000000000 | AT3G03200 | NAC045 |
| ARF11 | 1.1526639 | 0.00000000 | 0.000000000 | 0.00000000 | 0.031615490 | 0.000000000 | 0.000000000 | 0.471078970 | 0.64996943 | 0.000000000 | 0.000000000 | AT2G46530 | ARF11 |
| WOX2 | 0.6153504 | 0.00000000 | 0.000000000 | 0.00000000 | 0.025617433 | 0.000000000 | 0.000000000 | 0.000000000 | 0.58973295 | 0.000000000 | 0.000000000 | AT5G59340 | WOX2 |
| AT1G64530 | 1.0090791 | 0.05823341 | 0.087313508 | 0.08195501 | 0.083935590 | 0.027391445 | 0.033021114 | 0.000000000 | 0.57040078 | 0.008352434 | 0.058475786 | AT1G64530 | AT1G64530 |
| ET2 | 0.6569860 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.059093920 | 0.094088184 | 0.000000000 | 0.50380388 | 0.000000000 | 0.000000000 | AT5G56780 | ET2 |
| ARF18 | 0.7570837 | 0.00000000 | 0.000000000 | 0.03374005 | 0.000000000 | 0.105285718 | 0.198597938 | 0.009890134 | 0.39052540 | 0.014467090 | 0.004577384 | AT3G61830 | ARF18 |
| MBF1A | 0.7251328 | 0.01657087 | 0.089909864 | 0.00000000 | 0.014507098 | 0.029238589 | 0.105514812 | 0.000000000 | 0.38242405 | 0.000000000 | 0.086967539 | AT2G42680 | MBF1A |
| AT1G02030 | 0.4705940 | 0.00000000 | 0.020947177 | 0.00000000 | 0.035651439 | 0.000000000 | 0.000000000 | 0.000000000 | 0.37959144 | 0.034403983 | 0.000000000 | AT1G02030 | AT1G02030 |
| AGL80 | 0.3893251 | 0.00000000 | 0.000000000 | 0.00000000 | 0.003827751 | 0.008295924 | 0.046711894 | 0.000000000 | 0.32373516 | 0.000000000 | 0.006754346 | AT5G48670 | AGL80 |
| AT1G58220 | 0.4572639 | 0.00000000 | 0.003426918 | 0.00000000 | 0.024320089 | 0.004567734 | 0.103321366 | 0.000000000 | 0.27050640 | 0.002995879 | 0.048125521 | AT1G58220 | AT1G58220 |
| AT1G09710 | 0.4063927 | 0.00000000 | 0.000000000 | 0.01305040 | 0.004784689 | 0.060749649 | 0.092110582 | 0.000000000 | 0.21031228 | 0.018576679 | 0.006808466 | AT1G09710 | AT1G09710 |
| SPL13A | 0.3142244 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.027184817 | 0.000000000 | 0.20822558 | 0.059474512 | 0.019339473 | AT5G50570 | SPL13A |
| AT3G46070 | 0.1541026 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.14425743 | 0.009845194 | 0.000000000 | AT3G46070 | AT3G46070 |
| TCP24 | 0.1178094 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.11780944 | 0.000000000 | 0.000000000 | AT1G30210 | TCP24 |
| SPL10 | 0.1488705 | 0.00000000 | 0.000000000 | 0.00000000 | 0.005741627 | 0.002528828 | 0.016148697 | 0.000000000 | 0.08832757 | 0.008475331 | 0.027648459 | AT1G27370 | SPL10 |
| AT4G12850 | 0.1051155 | 0.00000000 | 0.030988627 | 0.01018749 | 0.002870813 | 0.000000000 | 0.000000000 | 0.000000000 | 0.06106859 | 0.000000000 | 0.000000000 | AT4G12850 | AT4G12850 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(phl_rank[1:10,], aes(x=reorder(GeneName, phl, decreasing = FALSE), y=phl)) + geom_point(size=4)+
labs(title="Phloem-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(phl_rank,"Phloem_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- phl_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Phloem ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
xyl_rank <- bc_rank[which(bc_rank$xyl*2 > bc_rank$all),]%>% arrange(desc(xyl))
xyl_rank$GeneName <- rownames(xyl_rank)
xyl_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| AT1G68810 | 15.740776 | 0.00000000 | 1.24410788 | 0.00000000 | 0.000000000 | 0.006039273 | 0.100109511 | 12.388537 | 2.00198178 | 0.000000000 | 0.00000000 | AT1G68810 | AT1G68810 |
| MYB46 | 10.975484 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 10.975484 | 0.00000000 | 0.000000000 | 0.00000000 | AT5G12870 | MYB46 |
| VND2 | 12.618169 | 0.00000000 | 1.12948393 | 0.00000000 | 0.000000000 | 0.000000000 | 0.006818368 | 10.346859 | 1.13500836 | 0.000000000 | 0.00000000 | AT4G36160 | VND2 |
| ATHB-15 | 15.439924 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.318966129 | 3.657313301 | 9.677060 | 1.78658486 | 0.000000000 | 0.00000000 | AT1G52150 | ATHB-15 |
| DOF2 | 13.224178 | 0.00000000 | 1.36575019 | 0.20072993 | 1.487350226 | 0.000000000 | 0.002870999 | 9.492840 | 0.59625901 | 0.017206816 | 0.06117147 | AT3G21270 | DOF2 |
| MYB83 | 9.307381 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 9.307381 | 0.00000000 | 0.000000000 | 0.00000000 | AT3G08500 | MYB83 |
| VND7 | 9.284049 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 9.284049 | 0.00000000 | 0.000000000 | 0.00000000 | AT1G71930 | VND7 |
| AT1G66810 | 10.071416 | 0.17251857 | 0.52012453 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 9.281125 | 0.00000000 | 0.097647795 | 0.00000000 | AT1G66810 | AT1G66810 |
| IAA6 | 9.310356 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 9.218519 | 0.09183673 | 0.000000000 | 0.00000000 | AT1G52830 | IAA6 |
| VND4 | 9.097454 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 9.097454 | 0.00000000 | 0.000000000 | 0.00000000 | AT1G12260 | VND4 |
| ZHD3 | 8.759365 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 8.759365 | 0.00000000 | 0.000000000 | 0.00000000 | AT2G02540 | ZHD3 |
| VND5 | 8.507632 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 8.507632 | 0.00000000 | 0.000000000 | 0.00000000 | AT1G62700 | VND5 |
| IAA8 | 12.840884 | 0.12171432 | 0.00000000 | 0.05909814 | 0.041909435 | 0.606687493 | 1.171022730 | 8.427339 | 1.16907518 | 0.813833815 | 0.43020350 | AT2G22670 | IAA8 |
| LBD18 | 8.776155 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 8.407800 | 0.00000000 | 0.005490096 | 0.36286446 | AT2G45420 | LBD18 |
| XND1 | 8.148155 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.011712843 | 8.046987 | 0.08945578 | 0.000000000 | 0.00000000 | AT5G64530 | XND1 |
| VND1 | 7.979560 | 0.00000000 | 0.07852107 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 7.875529 | 0.02551020 | 0.000000000 | 0.00000000 | AT2G18060 | VND1 |
| VND3 | 8.880562 | 0.00000000 | 0.04754762 | 0.00000000 | 0.000000000 | 0.000000000 | 0.012799787 | 7.566564 | 1.25365063 | 0.000000000 | 0.00000000 | AT5G66300 | VND3 |
| JLO | 7.504988 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 7.446554 | 0.00000000 | 0.016095282 | 0.04233802 | AT4G00220 | JLO |
| BHLH32 | 14.563942 | 0.05151862 | 1.57463777 | 0.19854996 | 0.099917999 | 3.786611414 | 0.983844784 | 7.317298 | 0.55156347 | 0.000000000 | 0.00000000 | AT3G25710 | BHLH32 |
| WLIM2a | 13.154491 | 0.54881186 | 3.79112766 | 0.01017919 | 0.047321919 | 0.123602481 | 0.748725324 | 6.996558 | 0.88816433 | 0.000000000 | 0.00000000 | AT2G39900 | WLIM2a |
| PHB | 12.040463 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.237371742 | 2.523777767 | 6.965859 | 2.17455922 | 0.021402373 | 0.11749355 | AT2G34710 | PHB |
| IAA11 | 12.550370 | 0.08622047 | 0.12355248 | 0.00000000 | 0.007556757 | 1.273799727 | 1.428987033 | 6.711306 | 2.76585491 | 0.075056372 | 0.07803629 | AT4G28640 | IAA11 |
| NAC075 | 12.001041 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.118185790 | 0.244830586 | 6.695381 | 4.88880550 | 0.008047641 | 0.04579085 | AT4G29230 | NAC075 |
| AT1G68200 | 6.677427 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 6.677427 | 0.00000000 | 0.000000000 | 0.00000000 | AT1G68200 | AT1G68200 |
| KNAT7 | 12.366370 | 2.67116714 | 0.12904688 | 0.56274129 | 0.625392411 | 0.276956970 | 0.598733886 | 6.660096 | 0.02561893 | 0.140758385 | 0.67585785 | AT1G62990 | KNAT7 |
| WOX13 | 12.067411 | 0.00000000 | 0.00000000 | 0.00000000 | 0.026334587 | 2.513367403 | 1.624525102 | 6.606082 | 1.29710156 | 0.000000000 | 0.00000000 | AT4G35550 | WOX13 |
| HB31 | 6.337598 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 6.337598 | 0.00000000 | 0.000000000 | 0.00000000 | AT1G14440 | HB31 |
| NAC010 | 9.937748 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 5.810148 | 0.33068220 | 1.240734700 | 2.55618313 | AT1G28470 | NAC010 |
| IAA31 | 11.124454 | 0.00000000 | 2.20788198 | 0.00000000 | 0.000000000 | 0.009141689 | 0.931777856 | 5.776671 | 2.19898169 | 0.000000000 | 0.00000000 | AT3G17600 | IAA31 |
| HAT14 | 6.959710 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 0.064327093 | 0.188703542 | 5.623012 | 1.08366770 | 0.000000000 | 0.00000000 | AT5G06710 | HAT14 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| IAA10 | 2.2761996 | 0.145945811 | 0.049826436 | 0.00000000 | 0.063554539 | 0.044499276 | 0.114979744 | 1.27450484 | 0.299186129 | 0.102669818 | 0.18103304 | AT1G04100 | IAA10 |
| PIF4 | 1.2094936 | 0.000000000 | 0.000000000 | 0.00000000 | 0.004784689 | 0.000000000 | 0.000000000 | 1.17621376 | 0.028495113 | 0.000000000 | 0.00000000 | AT2G43010 | PIF4 |
| RHA1 | 1.9875550 | 0.103293527 | 0.179681819 | 0.03796981 | 0.151906575 | 0.046512950 | 0.148716393 | 1.17183134 | 0.045426724 | 0.008047641 | 0.09416821 | AT5G45710 | RHA1 |
| AT5G18090 | 1.3263913 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 1.14236258 | 0.120090188 | 0.048215459 | 0.01572303 | AT5G18090 | AT5G18090 |
| AT1G21780 | 2.2515365 | 0.000000000 | 0.020976885 | 0.00000000 | 0.034143770 | 0.009456681 | 0.057540383 | 1.12693603 | 0.090826685 | 0.353475883 | 0.55818016 | AT1G21780 | AT1G21780 |
| HB34 | 1.3515069 | 0.034737721 | 0.010368775 | 0.00000000 | 0.019862568 | 0.013903040 | 0.054804112 | 1.11961032 | 0.090281938 | 0.000000000 | 0.00793841 | AT3G28920 | HB34 |
| SPL2 | 2.0435743 | 0.018894852 | 0.000000000 | 0.00000000 | 0.010620358 | 0.109835604 | 0.304257605 | 1.11948664 | 0.297317341 | 0.080194770 | 0.10296710 | AT5G43270 | SPL2 |
| AT5G03500 | 1.6575738 | 0.058704714 | 0.213082558 | 0.00000000 | 0.132206428 | 0.019820263 | 0.029805077 | 1.09844821 | 0.057508895 | 0.026325461 | 0.02167218 | AT5G03500 | AT5G03500 |
| AT3G22100 | 1.5387316 | 0.000000000 | 0.006941857 | 0.00000000 | 0.000000000 | 0.018023138 | 0.014594418 | 1.06322604 | 0.408444118 | 0.007105468 | 0.02039659 | AT3G22100 | AT3G22100 |
| AT1G51200 | 1.9263451 | 0.000000000 | 0.064743423 | 0.00000000 | 0.040979392 | 0.071402403 | 0.436821987 | 1.05976931 | 0.136414491 | 0.000000000 | 0.11621412 | AT1G51200 | AT1G51200 |
| AT1G24040 | 1.0093640 | 0.000000000 | 0.000000000 | 0.00000000 | 0.002870813 | 0.000000000 | 0.000000000 | 1.00349735 | 0.000000000 | 0.002995879 | 0.00000000 | AT1G24040 | AT1G24040 |
| IWS1 | 1.6326421 | 0.089205871 | 0.047996690 | 0.03788680 | 0.116301168 | 0.030334341 | 0.124837727 | 0.94627349 | 0.092484494 | 0.000000000 | 0.14732156 | AT1G32130 | IWS1 |
| AT1G26300 | 1.7266014 | 0.087124887 | 0.157036812 | 0.08665441 | 0.161443425 | 0.038088967 | 0.070749444 | 0.93264995 | 0.101221580 | 0.042491354 | 0.04914057 | AT1G26300 | AT1G26300 |
| GT-1 | 1.6468655 | 0.000000000 | 0.102939419 | 0.01760136 | 0.083759454 | 0.093574124 | 0.216666653 | 0.89370839 | 0.222225816 | 0.000000000 | 0.01639030 | AT1G13450 | GT-1 |
| AT5G06770 | 1.1767088 | 0.014699067 | 0.091938705 | 0.03260813 | 0.070863131 | 0.000000000 | 0.005034728 | 0.88094842 | 0.041496599 | 0.000000000 | 0.03912002 | AT5G06770 | AT5G06770 |
| MYB25 | 1.2989850 | 0.047367786 | 0.000000000 | 0.05828470 | 0.077750444 | 0.207520597 | 0.039220558 | 0.84874511 | 0.020095782 | 0.000000000 | 0.00000000 | AT2G39880 | MYB25 |
| AL2 | 1.4679700 | 0.000000000 | 0.085056479 | 0.02852650 | 0.072986023 | 0.021832074 | 0.071542529 | 0.80473242 | 0.178881880 | 0.000000000 | 0.20441209 | AT3G11200 | AL2 |
| JMJ14 | 1.5057936 | 0.052093312 | 0.058505892 | 0.01836174 | 0.030805190 | 0.045206610 | 0.047611616 | 0.79877611 | 0.084254665 | 0.152599993 | 0.21757852 | AT4G20400 | JMJ14 |
| FBH2 | 1.0955629 | 0.037892296 | 0.000000000 | 0.01351045 | 0.029638329 | 0.022029934 | 0.010774162 | 0.74129668 | 0.173495992 | 0.012584920 | 0.05434009 | AT4G09180 | FBH2 |
| RFI2 | 1.3929314 | 0.000000000 | 0.123497053 | 0.03637426 | 0.087273474 | 0.035972385 | 0.150545647 | 0.73209023 | 0.122417092 | 0.003927655 | 0.10083363 | AT2G47700 | RFI2 |
| ARF1 | 1.3087496 | 0.056879133 | 0.126052676 | 0.03406550 | 0.047283056 | 0.021159261 | 0.094533372 | 0.66034563 | 0.158353317 | 0.008352434 | 0.10172524 | AT1G59750 | ARF1 |
| GIF3 | 0.6682404 | 0.000000000 | 0.000000000 | 0.00000000 | 0.036867189 | 0.006830284 | 0.028454822 | 0.59608811 | 0.000000000 | 0.000000000 | 0.00000000 | AT4G00850 | GIF3 |
| BZIP24 | 0.6897504 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.056222886 | 0.48148666 | 0.152040816 | 0.000000000 | 0.00000000 | AT3G51960 | BZIP24 |
| AT3G45880 | 0.5323593 | 0.060966050 | 0.000000000 | 0.00000000 | 0.012440191 | 0.041100061 | 0.000000000 | 0.40426226 | 0.013590772 | 0.000000000 | 0.00000000 | AT3G45880 | AT3G45880 |
| AT5G25470 | 0.7261561 | 0.005428218 | 0.000000000 | 0.06988506 | 0.000000000 | 0.000000000 | 0.000000000 | 0.38261960 | 0.045498588 | 0.153038939 | 0.06968570 | AT5G25470 | AT5G25470 |
| AGL64 | 0.2736777 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.27367770 | 0.000000000 | 0.000000000 | 0.00000000 | AT1G29962 | AGL64 |
| ARR15 | 0.2637723 | 0.000000000 | 0.000000000 | 0.01017919 | 0.000000000 | 0.007766728 | 0.013278628 | 0.20431648 | 0.028231293 | 0.000000000 | 0.00000000 | AT1G74890 | ARR15 |
| ORC1A | 0.1222350 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.023672282 | 0.002874891 | 0.09568786 | 0.000000000 | 0.000000000 | 0.00000000 | AT4G14700 | ORC1A |
| EMB93 | 0.1269562 | 0.000000000 | 0.000000000 | 0.00000000 | 0.017948692 | 0.016827075 | 0.002159837 | 0.07255298 | 0.004980622 | 0.000000000 | 0.01248699 | AT2G03050 | EMB93 |
| AT4G08250 | 0.1061213 | 0.000000000 | 0.006765816 | 0.00000000 | 0.036670900 | 0.000000000 | 0.000000000 | 0.06268456 | 0.000000000 | 0.000000000 | 0.00000000 | AT4G08250 | AT4G08250 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(xyl_rank[1:10,], aes(x=reorder(GeneName, xyl, decreasing = FALSE), y=xyl)) + geom_point(size=4)+
labs(title="Xylem-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(xyl_rank,"Xylem_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- xyl_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Xylem ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
lrc_rank <- bc_rank[which(bc_rank$lrc*2 > bc_rank$all),]%>% arrange(desc(lrc))
lrc_rank$GeneName <- rownames(lrc_rank)
lrc_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| WRKY9 | 14.59444184 | 4.26077798 | 1.584302664 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 7.94390354 | 0.80545766 | AT1G68150 |
| ARF16 | 13.02068521 | 2.30930704 | 0.282169631 | 1.17619173 | 0.062867295 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 6.66173619 | 2.52841331 | AT4G30080 |
| IAA1 | 8.42649079 | 1.57459699 | 0.158407992 | 0.91438152 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 4.91253603 | 0.86656826 | AT4G14560 |
| AIL5 | 6.18681707 | 0.34670087 | 0.000000000 | 0.16137931 | 0.000000000 | 0.003858615 | 0.016628469 | 0.0000000 | 0.000000000 | 4.49512079 | 1.16312903 | AT5G57390 |
| ANL2 | 7.72406933 | 1.81627086 | 0.678029016 | 0.83919527 | 0.081317480 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 3.91301596 | 0.39624074 | AT4G00730 |
| AT1G74840 | 7.03802367 | 0.79216261 | 0.262263253 | 0.47640862 | 0.379859229 | 0.103724502 | 0.078108719 | 0.4127525 | 0.015306122 | 3.81472680 | 0.70271129 | AT1G74840 |
| AT2G35910 | 5.89403877 | 0.25140897 | 0.086950316 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 3.04980461 | 2.50587487 | AT2G35910 |
| AT1G05805 | 5.62101306 | 0.73134990 | 0.147438623 | 0.08463056 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 2.89665376 | 1.76094022 | AT1G05805 |
| LBD4 | 4.28618263 | 0.57698722 | 0.000000000 | 0.32905393 | 0.059190925 | 0.007766728 | 0.000000000 | 0.0000000 | 0.083912430 | 2.85794378 | 0.37132761 | AT1G31320 |
| WRKY11 | 5.31161013 | 0.93106987 | 0.148175423 | 0.18886427 | 0.143139072 | 0.074074034 | 0.211963195 | 0.1748415 | 0.025510204 | 2.84133235 | 0.57264023 | AT4G31550 |
| AT1G21000 | 4.56164450 | 0.18957223 | 0.057886042 | 0.00000000 | 0.010526316 | 0.154082344 | 0.388535398 | 0.0000000 | 0.512590626 | 2.43269988 | 0.81575166 | AT1G21000 |
| GRF2 | 2.49907754 | 0.33846432 | 0.262743451 | 0.19702918 | 0.048134481 | 0.023374603 | 0.000000000 | 0.0000000 | 0.096837447 | 1.34028931 | 0.19220475 | AT4G37740 |
| RBR1 | 2.49318081 | 0.29070964 | 0.006337552 | 0.20516116 | 0.012341446 | 0.020100694 | 0.013899162 | 0.0000000 | 0.052353806 | 1.28988270 | 0.60239465 | AT3G12280 |
| AT2G42300 | 2.17845764 | 0.15520149 | 0.005692168 | 0.14585323 | 0.002870813 | 0.000000000 | 0.000000000 | 0.0000000 | 0.004556113 | 1.21114731 | 0.65313652 | AT2G42300 |
| CSDP1 | 2.24042740 | 0.25554447 | 0.087881603 | 0.25174182 | 0.031129832 | 0.068795108 | 0.081226614 | 0.0000000 | 0.004556113 | 1.16031167 | 0.29924017 | AT4G36020 |
| PYE | 1.27470844 | 0.11917141 | 0.074016999 | 0.03755968 | 0.052071285 | 0.018826012 | 0.023433715 | 0.0000000 | 0.116769193 | 0.69282134 | 0.14003881 | AT3G47640 |
| NAC016 | 1.15907316 | 0.00000000 | 0.000000000 | 0.06291777 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.63629719 | 0.45985820 | AT1G34180 |
| HDG1 | 0.92249741 | 0.18877141 | 0.074561948 | 0.05149425 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.55821376 | 0.04945604 | AT3G61150 |
| HDG2 | 0.59744088 | 0.02955690 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.52222535 | 0.04565862 | AT1G05230 |
| AGL94 | 0.72766611 | 0.01876420 | 0.000000000 | 0.04378426 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.51522054 | 0.14989711 | AT1G69540 |
| TRFL3 | 0.92037699 | 0.06923757 | 0.000000000 | 0.12912467 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.016194401 | 0.51106225 | 0.19475810 | AT1G17460 |
| HDG12 | 0.65436885 | 0.13558859 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.38708075 | 0.13169951 | AT1G17920 |
| RING1 | 0.29964647 | 0.00000000 | 0.000000000 | 0.07522546 | 0.000000000 | 0.000000000 | 0.005030837 | 0.0000000 | 0.000000000 | 0.15539321 | 0.06399696 | AT5G10380 |
| NAC063 | 0.09215283 | 0.00000000 | 0.000000000 | 0.02376658 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.05143864 | 0.01694761 | AT3G55210 |
| BEH1 | 0.07537649 | 0.00000000 | 0.000000000 | 0.00000000 | 0.002870813 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.05100034 | 0.02150534 | AT3G50750 |
| AT4G11400 | 0.02217396 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.0000000 | 0.000000000 | 0.02217396 | 0.00000000 | AT4G11400 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(lrc_rank[1:10,], aes(x=reorder(GeneName, lrc, decreasing = FALSE), y=lrc)) + geom_point(size=4)+
labs(title="LRC-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(lrc_rank,"LRC_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- lrc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Lateral Root Cap ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
col_rank <- bc_rank[which(bc_rank$col*2 > bc_rank$all),]%>% arrange(desc(col))
col_rank$GeneName <- rownames(col_rank)
col_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <chr> | |
| FBH4 | 9.21690577 | 0.08544729 | 0.015616942 | 0.311309772 | 0.041168776 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 3.082557208 | 5.68080579 | AT2G42280 | FBH4 |
| LBD41 | 10.15628931 | 0.37963773 | 0.154816921 | 0.000000000 | 0.056226204 | 0.034139350 | 0.102615142 | 0.00000000 | 0.000000000 | 4.249628884 | 5.17922508 | AT3G02550 | LBD41 |
| WRKY26 | 6.08956508 | 0.16351024 | 0.009279390 | 0.000000000 | 0.000000000 | 0.154740276 | 0.215891510 | 0.00000000 | 0.000000000 | 1.647842854 | 3.89830081 | AT5G07100 | WRKY26 |
| WRKY33 | 6.83291024 | 0.46618916 | 0.205871271 | 0.553852838 | 0.294000502 | 0.031296264 | 0.041761170 | 0.00000000 | 0.000000000 | 1.771403980 | 3.46853505 | AT2G38470 | WRKY33 |
| RAP2.4 | 6.43730169 | 0.22312443 | 0.033721735 | 0.213625266 | 0.153915889 | 0.127748431 | 0.169710654 | 0.31480704 | 0.142573262 | 1.730703534 | 3.32737144 | AT1G78080 | RAP2.4 |
| AT3G57800 | 6.08336328 | 0.18974626 | 0.000000000 | 0.000000000 | 0.000000000 | 0.074188410 | 0.125972115 | 0.00000000 | 0.407182871 | 2.099200100 | 3.18707352 | AT3G57800 | AT3G57800 |
| NAM | 3.79313739 | 0.02291742 | 0.000000000 | 0.112133792 | 0.017548508 | 0.000000000 | 0.026557424 | 0.00000000 | 0.000000000 | 0.451476499 | 3.16250375 | AT1G52880 | NAM |
| AT1G76580 | 5.84721261 | 0.19579291 | 0.003426918 | 0.036145004 | 0.015863019 | 0.002283867 | 0.002159837 | 0.00000000 | 0.010421124 | 2.548629052 | 3.03249087 | AT1G76580 | AT1G76580 |
| RAP2.1 | 5.77680396 | 0.03234374 | 0.000000000 | 0.556970110 | 0.008936067 | 0.004570844 | 0.017023461 | 1.24396318 | 0.000000000 | 0.881365198 | 3.03163136 | AT1G46768 | RAP2.1 |
| AT2G41835 | 3.87965965 | 0.13192815 | 0.023170877 | 0.000000000 | 0.010526316 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.024882475 | 2.68915183 | AT2G41835 | AT2G41835 |
| BZIP25 | 3.72594983 | 0.33605129 | 0.095767447 | 0.036387960 | 0.111317365 | 0.006809886 | 0.005975666 | 0.00000000 | 0.058950776 | 0.593971326 | 2.48071811 | AT3G54620 | BZIP25 |
| ARF10 | 3.76891761 | 0.25108581 | 0.000000000 | 0.118337754 | 0.059726788 | 0.000000000 | 0.000000000 | 0.01976941 | 0.025834065 | 0.993883806 | 2.30027998 | AT2G28350 | ARF10 |
| RDUF1 | 3.76671081 | 0.31386155 | 0.050408431 | 0.300161955 | 0.119111549 | 0.000000000 | 0.002159837 | 0.00000000 | 0.025877702 | 0.877671834 | 2.07745796 | AT3G46620 | RDUF1 |
| AT3G25790 | 2.85056247 | 0.16578889 | 0.051120652 | 0.356432164 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.844790041 | 1.43243073 | AT3G25790 | AT3G25790 |
| SCL1 | 2.61524374 | 0.14496105 | 0.171904099 | 0.075889766 | 0.047610224 | 0.262878319 | 0.280218106 | 0.00000000 | 0.004421769 | 0.232588303 | 1.39477210 | AT1G21450 | SCL1 |
| NAC052 | 2.58854529 | 0.03733211 | 0.004584554 | 0.000000000 | 0.045545292 | 0.019973139 | 0.082119023 | 0.00000000 | 0.017125550 | 0.990821149 | 1.39104448 | AT3G10490 | NAC052 |
| RR1 | 2.51617603 | 0.21008848 | 0.193746721 | 0.176242078 | 0.055379338 | 0.009246258 | 0.009702941 | 0.00000000 | 0.054767492 | 0.449956323 | 1.35704640 | AT3G16857 | RR1 |
| AT5G23405 | 1.58562547 | 0.18117590 | 0.000000000 | 0.053793103 | 0.043515887 | 0.105419374 | 0.015084398 | 0.00000000 | 0.002199011 | 0.191242358 | 0.99319544 | AT5G23405 | AT5G23405 |
| AT1G77570 | 1.57187534 | 0.09300887 | 0.000000000 | 0.000000000 | 0.005741627 | 0.118670010 | 0.085011664 | 0.00000000 | 0.013406625 | 0.283118756 | 0.97291779 | AT1G77570 | AT1G77570 |
| TLP7 | 1.55209293 | 0.01733708 | 0.031176285 | 0.067319146 | 0.058993485 | 0.014940502 | 0.062609222 | 0.00000000 | 0.057371301 | 0.327744533 | 0.91460138 | AT1G53320 | TLP7 |
| ATRX | 1.64389257 | 0.10506360 | 0.010876555 | 0.054272307 | 0.044412242 | 0.068175746 | 0.114064503 | 0.00000000 | 0.117546164 | 0.229980245 | 0.89950122 | AT1G08600 | ATRX |
| EIN3 | 1.44787717 | 0.06541126 | 0.076155996 | 0.010404860 | 0.056838409 | 0.003446658 | 0.010774162 | 0.00000000 | 0.017046594 | 0.315519679 | 0.89227955 | AT3G20770 | EIN3 |
| CHR11 | 1.71702541 | 0.02774173 | 0.029127105 | 0.008146673 | 0.037628380 | 0.056752901 | 0.070961555 | 0.07682890 | 0.156488502 | 0.378209665 | 0.87514000 | AT3G06400 | CHR11 |
| NTT | 1.35753953 | 0.06407164 | 0.000000000 | 0.107515473 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.373950787 | 0.81200163 | AT3G57670 | NTT |
| PC-MYB1 | 1.35353355 | 0.05645635 | 0.031216314 | 0.074043300 | 0.025486950 | 0.004567734 | 0.006585116 | 0.00000000 | 0.061528360 | 0.301661651 | 0.79198778 | AT4G32730 | PC-MYB1 |
| AT2G44430 | 1.54390908 | 0.12554252 | 0.093371310 | 0.082599267 | 0.075846597 | 0.000000000 | 0.002159837 | 0.07442401 | 0.002199011 | 0.305627905 | 0.78213863 | AT2G44430 | AT2G44430 |
| AT3G52250 | 1.50135855 | 0.08096882 | 0.018739749 | 0.140354817 | 0.050576242 | 0.015323379 | 0.051827611 | 0.00000000 | 0.096452854 | 0.281457852 | 0.76565722 | AT3G52250 | AT3G52250 |
| SDG2 | 1.29626788 | 0.06100263 | 0.058241779 | 0.118773135 | 0.052404819 | 0.008217638 | 0.046319150 | 0.00000000 | 0.045728549 | 0.225443465 | 0.68013672 | AT4G15180 | SDG2 |
| DRIP2 | 0.88699742 | 0.06037327 | 0.025711804 | 0.000000000 | 0.002870813 | 0.019964207 | 0.004315010 | 0.00000000 | 0.002199011 | 0.130957635 | 0.64060567 | AT2G30580 | DRIP2 |
| AT5G65910 | 1.21587764 | 0.03797942 | 0.053339947 | 0.054307068 | 0.078933090 | 0.022109564 | 0.027478706 | 0.04264086 | 0.043911965 | 0.218252278 | 0.63692473 | AT5G65910 | AT5G65910 |
| AT1G01260 | 0.91308189 | 0.06834988 | 0.030054645 | 0.010179194 | 0.057373150 | 0.019331648 | 0.045221122 | 0.00000000 | 0.002199011 | 0.183056927 | 0.49731631 | AT1G01260 | AT1G01260 |
| PRR7 | 0.91532394 | 0.06027178 | 0.164146035 | 0.000000000 | 0.008612440 | 0.000000000 | 0.002159837 | 0.00000000 | 0.015853027 | 0.179024099 | 0.48525672 | AT5G02810 | PRR7 |
| SNL4 | 0.91624830 | 0.05737301 | 0.022442995 | 0.091894093 | 0.072399865 | 0.029037433 | 0.017616834 | 0.00000000 | 0.040292127 | 0.121351997 | 0.46383995 | AT1G70060 | SNL4 |
| AT3G54460 | 0.71523062 | 0.01909819 | 0.011438391 | 0.000000000 | 0.030172894 | 0.011823946 | 0.002159837 | 0.00000000 | 0.000000000 | 0.199529824 | 0.44100753 | AT3G54460 | AT3G54460 |
| AT4G13040 | 0.64346424 | 0.06263079 | 0.043965360 | 0.058973848 | 0.011806881 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.069764026 | 0.39632334 | AT4G13040 | AT4G13040 |
| BPC7 | 0.29284362 | 0.00000000 | 0.000000000 | 0.012272325 | 0.003827751 | 0.000000000 | 0.010647049 | 0.00000000 | 0.000000000 | 0.108388895 | 0.15770760 | AT2G35550 | BPC7 |
| SPL11 | 0.27823988 | 0.00000000 | 0.000000000 | 0.000000000 | 0.010526316 | 0.000000000 | 0.000000000 | 0.00000000 | 0.008340497 | 0.108965840 | 0.15040723 | AT1G27360 | SPL11 |
| SDG29 | 0.22089640 | 0.00000000 | 0.015553163 | 0.014721440 | 0.028796110 | 0.000000000 | 0.005749782 | 0.00000000 | 0.000000000 | 0.025081703 | 0.13099420 | AT5G53430 | SDG29 |
| EMF2 | 0.19763355 | 0.00000000 | 0.013205829 | 0.017601364 | 0.024431267 | 0.000000000 | 0.005392596 | 0.00000000 | 0.028097507 | 0.007873928 | 0.10103106 | AT5G51230 | EMF2 |
| AT5G25790 | 0.17295633 | 0.00000000 | 0.000000000 | 0.000000000 | 0.004784689 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.079505712 | 0.08866593 | AT5G25790 | AT5G25790 |
| HDG11 | 0.14019222 | 0.00000000 | 0.030948599 | 0.000000000 | 0.007556757 | 0.002360119 | 0.006470182 | 0.00000000 | 0.004556113 | 0.000000000 | 0.08830045 | AT1G73360 | HDG11 |
| AT2G33550 | 0.11818869 | 0.00000000 | 0.000000000 | 0.000000000 | 0.004784689 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.026031593 | 0.08737241 | AT2G33550 | AT2G33550 |
| NF-YC12 | 0.11207378 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.015459035 | 0.000000000 | 0.00000000 | 0.000000000 | 0.024809713 | 0.07180503 | AT5G38140 | NF-YC12 |
| MYB1 | 0.12609163 | 0.00000000 | 0.028175665 | 0.000000000 | 0.003827751 | 0.004888947 | 0.006470182 | 0.00000000 | 0.000000000 | 0.018917257 | 0.06381183 | AT3G09230 | MYB1 |
| AT4G36050 | 0.08286675 | 0.00000000 | 0.009335155 | 0.000000000 | 0.005741627 | 0.000000000 | 0.002159837 | 0.00000000 | 0.000000000 | 0.007105468 | 0.05852467 | AT4G36050 | AT4G36050 |
| AT1G18560 | 0.05197159 | 0.00000000 | 0.000000000 | 0.000000000 | 0.002870813 | 0.002528828 | 0.002159837 | 0.00000000 | 0.000000000 | 0.004621896 | 0.03979022 | AT1G18560 | AT1G18560 |
| RR14 | 0.01474688 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.01474688 | AT2G01760 | RR14 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(col_rank[1:10,], aes(x=reorder(GeneName, col, decreasing = FALSE), y=col)) + geom_point(size=4)+
labs(title="Columella-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(col_rank,"Columella_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- col_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Columella ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
bc_rank <- bc_rank %>% mutate(ground=cor+end, epi=atri+tri, stele=per+pro+xyl+phl, epilrc=atri+tri+lrc, rc=lrc+col)
head(bc_rank)
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | |
| BZIP9 | 31.71447 | 0.000000 | 0.000000 | 0.000000000 | 0.006698565 | 8.04635576 | 11.94430365 | 0.03622764 | 11.6808854 | 0.000000 | 0.000000 | AT5G24800 | 0.006698565 | 0.000000 | 31.70777241 | 0.00000 | 0.00000 |
| AT3G43430 | 29.50134 | 0.000000 | 0.000000 | 0.005375774 | 0.006698565 | 8.92414305 | 10.03369110 | 3.50786160 | 7.0235724 | 0.000000 | 0.000000 | AT3G43430 | 0.012074338 | 0.000000 | 29.48926813 | 0.00000 | 0.00000 |
| HAT7 | 32.32415 | 7.054065 | 5.626399 | 8.996598123 | 4.910315271 | 0.02122024 | 0.00000000 | 0.00000000 | 0.0000000 | 4.433060 | 1.282490 | AT5G15150 | 13.906913394 | 12.680464 | 0.02122024 | 17.11352 | 5.71555 |
| PLT1 | 22.94342 | 3.573806 | 0.000000 | 2.592117793 | 1.958605076 | 0.00000000 | 0.00000000 | 0.00000000 | 0.0000000 | 9.283443 | 5.535445 | AT3G20840 | 4.550722869 | 3.573806 | 0.00000000 | 12.85725 | 14.81889 |
| MYB36 | 19.51309 | 0.000000 | 0.000000 | 3.965572845 | 11.648226873 | 3.89929436 | 0.00000000 | 0.00000000 | 0.0000000 | 0.000000 | 0.000000 | AT5G57620 | 15.613799719 | 0.000000 | 3.89929436 | 0.00000 | 0.00000 |
| GATA2 | 30.67747 | 7.853413 | 5.533161 | 2.445113736 | 1.382593066 | 0.50181676 | 0.08967606 | 0.05936252 | 0.4627788 | 10.404863 | 1.944695 | AT2G45050 | 3.827706802 | 13.386574 | 1.11363412 | 23.79144 | 12.34956 |
ground_rank <- bc_rank[which(bc_rank$ground*2 > bc_rank$all),]%>% arrange(desc(ground))
ground_rank <- ground_rank[-c(match(rownames(cor_rank), rownames(ground_rank)),match(rownames(end_rank), rownames(ground_rank))),]
ground_rank$GeneName <- rownames(ground_rank)
ground_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| MYB12 | 24.9903130 | 0.24110551 | 0.155912849 | 10.11052553 | 5.93936241 | 1.060157731 | 1.112878224 | 4.32086271 | 1.413089539 | 0.019414381 | 0.617004128 | AT2G47460 | 16.04988794 | 0.39701836 | 7.90698820 | 0.416432743 | 0.636418509 | MYB12 |
| MYB3 | 13.9699937 | 0.60984641 | 0.022671060 | 3.85248356 | 6.57827101 | 1.638384163 | 0.167072786 | 0.70609703 | 0.132993197 | 0.201219738 | 0.060954763 | AT1G22640 | 10.43075457 | 0.63251747 | 2.64454718 | 0.833737212 | 0.262174501 | MYB3 |
| ARR3 | 11.3866183 | 0.31216200 | 0.052917778 | 4.72919423 | 3.40853435 | 0.619778245 | 0.725112144 | 0.00000000 | 0.624981197 | 0.241675809 | 0.672262527 | AT1G59940 | 8.13772857 | 0.36507978 | 1.96987159 | 0.606755587 | 0.913938336 | ARR3 |
| AN3 | 9.2949905 | 0.76003007 | 0.067984101 | 2.89514322 | 3.03261764 | 2.092481149 | 0.087673905 | 0.00000000 | 0.050983200 | 0.215306608 | 0.092770587 | AT5G28640 | 5.92776086 | 0.82801417 | 2.23113825 | 1.043320778 | 0.308077196 | AN3 |
| AtHB23 | 9.3641950 | 0.56403507 | 0.266474042 | 3.30633079 | 1.68667744 | 1.367882112 | 1.109416779 | 0.17487407 | 0.743953144 | 0.063654104 | 0.080897453 | AT1G26960 | 4.99300823 | 0.83050911 | 3.39612610 | 0.894163215 | 0.144551557 | AtHB23 |
| GATA16 | 8.8033220 | 0.16763151 | 0.000000000 | 3.04103843 | 1.81470603 | 1.924130832 | 0.247701641 | 0.54901066 | 0.041496599 | 0.251383147 | 0.766223174 | AT5G49300 | 4.85574446 | 0.16763151 | 2.76233974 | 0.419014658 | 1.017606321 | GATA16 |
| ULT1 | 7.4525749 | 0.28099737 | 0.000000000 | 2.55419627 | 2.08284711 | 1.310984580 | 0.164780230 | 0.10545857 | 0.015100330 | 0.325720857 | 0.612489631 | AT4G28190 | 4.63704338 | 0.28099737 | 1.59632371 | 0.606718228 | 0.938210488 | ULT1 |
| HSFB4 | 5.0981755 | 0.10342921 | 0.000000000 | 2.13965901 | 2.15503629 | 0.357389408 | 0.174115559 | 0.00000000 | 0.145918367 | 0.000000000 | 0.022627675 | AT1G46264 | 4.29469530 | 0.10342921 | 0.67742333 | 0.103429215 | 0.022627675 | HSFB4 |
| AT1G62975 | 5.8694822 | 1.65547109 | 0.154284913 | 2.02293197 | 1.40170744 | 0.081426014 | 0.083870434 | 0.13113569 | 0.302474051 | 0.036180633 | 0.000000000 | AT1G62975 | 3.42463941 | 1.80975600 | 0.59890619 | 1.845936635 | 0.036180633 | AT1G62975 |
| AT5G57150 | 5.3562457 | 0.11867220 | 0.000000000 | 0.85827788 | 2.53162448 | 0.516855553 | 0.461826231 | 0.00000000 | 0.793736670 | 0.041566157 | 0.033686545 | AT5G57150 | 3.38990237 | 0.11867220 | 1.77241845 | 0.160238360 | 0.075252702 | AT5G57150 |
| AT3G24120 | 3.9663789 | 1.10825268 | 0.000000000 | 1.64426771 | 0.91219490 | 0.167949363 | 0.094099703 | 0.00000000 | 0.015947693 | 0.008485975 | 0.015180823 | AT3G24120 | 2.55646261 | 1.10825268 | 0.27799676 | 1.116738657 | 0.023666799 | AT3G24120 |
| HB5 | 4.0171237 | 0.04024887 | 0.000000000 | 1.66474312 | 0.87650434 | 0.390854613 | 0.527293806 | 0.00000000 | 0.512384345 | 0.000000000 | 0.005094571 | AT5G65310 | 2.54124745 | 0.04024887 | 1.43053276 | 0.040248875 | 0.005094571 | HB5 |
| AT1G63100 | 3.7848777 | 0.48255072 | 0.021936403 | 1.63220353 | 0.63618954 | 0.066889926 | 0.000000000 | 0.00000000 | 0.000000000 | 0.945107625 | 0.000000000 | AT1G63100 | 2.26839307 | 0.50448712 | 0.06688993 | 1.449594748 | 0.945107625 | AT1G63100 |
| SCL3 | 4.1297526 | 0.00000000 | 0.000000000 | 0.45895004 | 1.76000289 | 0.342801212 | 0.128740187 | 0.00000000 | 0.000000000 | 0.109564975 | 1.329693279 | AT1G50420 | 2.21895293 | 0.00000000 | 0.47154140 | 0.109564975 | 1.439258254 | SCL3 |
| AT3G61420 | 3.4846153 | 1.15104176 | 0.229900919 | 1.42523024 | 0.59310177 | 0.021501844 | 0.014822332 | 0.00000000 | 0.000000000 | 0.013960953 | 0.035055509 | AT3G61420 | 2.01833201 | 1.38094268 | 0.03632418 | 1.394903634 | 0.049016462 | AT3G61420 |
| MYB34 | 3.1675221 | 0.00000000 | 0.000000000 | 0.80763535 | 0.83879023 | 0.586069172 | 0.625573288 | 0.00000000 | 0.237965008 | 0.071489030 | 0.000000000 | AT5G60890 | 1.64642558 | 0.00000000 | 1.44960747 | 0.071489030 | 0.071489030 | MYB34 |
| AT4G36860 | 2.7698259 | 0.03720009 | 0.000000000 | 0.54737266 | 0.96540492 | 0.086430939 | 0.048198441 | 0.45036560 | 0.266761683 | 0.026715780 | 0.341375799 | AT4G36860 | 1.51277757 | 0.03720009 | 0.85175666 | 0.063915866 | 0.368091578 | AT4G36860 |
| COL4 | 2.1269186 | 0.08240666 | 0.006853837 | 0.99066948 | 0.37962992 | 0.067872114 | 0.040070995 | 0.00000000 | 0.000000000 | 0.076338855 | 0.483076741 | AT5G24930 | 1.37029940 | 0.08926050 | 0.10794311 | 0.165599353 | 0.559415595 | COL4 |
| OFP12 | 2.1971041 | 0.70711487 | 0.114515301 | 0.90671943 | 0.37176323 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.079667654 | 0.017323618 | AT1G05420 | 1.27848266 | 0.82163017 | 0.00000000 | 0.901297828 | 0.096991272 | OFP12 |
| AT4G28030 | 2.1177644 | 0.28074011 | 0.559077780 | 1.02600318 | 0.20719745 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.008047641 | 0.036698207 | AT4G28030 | 1.23320063 | 0.83981789 | 0.00000000 | 0.847865534 | 0.044745847 | AT4G28030 |
| HB6 | 2.0780562 | 0.02771770 | 0.057032002 | 0.70289373 | 0.42376316 | 0.087077802 | 0.087424448 | 0.00000000 | 0.091004792 | 0.199154386 | 0.401988172 | AT2G22430 | 1.12665689 | 0.08474971 | 0.26550704 | 0.283904093 | 0.601142558 | HB6 |
| 3xHMG-box1 | 1.6336905 | 0.13488663 | 0.111669417 | 0.69006889 | 0.34764546 | 0.102381436 | 0.000000000 | 0.00000000 | 0.000000000 | 0.212967495 | 0.034071135 | AT4G11080 | 1.03771436 | 0.24655604 | 0.10238144 | 0.459523539 | 0.247038630 | 3xHMG-box1 |
| LCL1 | 1.6990622 | 0.01173029 | 0.000000000 | 0.43878391 | 0.50789186 | 0.162660742 | 0.366807281 | 0.04833887 | 0.018224451 | 0.000000000 | 0.144624779 | AT5G02840 | 0.94667577 | 0.01173029 | 0.59603134 | 0.011730290 | 0.144624779 | LCL1 |
| ZFN1 | 1.5993599 | 0.00000000 | 0.000000000 | 0.62544006 | 0.25317652 | 0.041587771 | 0.066446955 | 0.00000000 | 0.052084732 | 0.127920780 | 0.432703120 | AT3G02830 | 0.87861659 | 0.00000000 | 0.16011946 | 0.127920780 | 0.560623900 | ZFN1 |
| AT5G58900 | 1.3231690 | 0.16242466 | 0.127262042 | 0.59026020 | 0.15109436 | 0.003446658 | 0.007547768 | 0.00000000 | 0.207962204 | 0.006661683 | 0.066509384 | AT5G58900 | 0.74135456 | 0.28968670 | 0.21895663 | 0.296348385 | 0.073171067 | AT5G58900 |
| MYB14 | 1.1552817 | 0.18165412 | 0.000000000 | 0.47417819 | 0.15312211 | 0.083405713 | 0.111064144 | 0.09899904 | 0.000000000 | 0.000000000 | 0.052858356 | AT2G31180 | 0.62730030 | 0.18165412 | 0.29346890 | 0.181654123 | 0.052858356 | MYB14 |
| AT3G61180 | 1.0406172 | 0.04931677 | 0.081243024 | 0.37054951 | 0.25101662 | 0.068276349 | 0.120640298 | 0.03979186 | 0.051257569 | 0.000000000 | 0.008525249 | AT3G61180 | 0.62156613 | 0.13055980 | 0.27996607 | 0.130559796 | 0.008525249 | AT3G61180 |
| GATA27 | 0.7253749 | 0.00000000 | 0.080171998 | 0.18313589 | 0.30006535 | 0.040923176 | 0.057736578 | 0.00000000 | 0.030908749 | 0.000000000 | 0.032433154 | AT5G47140 | 0.48320124 | 0.08017200 | 0.12956850 | 0.080171998 | 0.032433154 | GATA27 |
| TGA3 | 0.6985618 | 0.08372744 | 0.033861981 | 0.32226839 | 0.04694648 | 0.000000000 | 0.000000000 | 0.00000000 | 0.075022740 | 0.010980192 | 0.125754625 | AT1G22070 | 0.36921487 | 0.11758942 | 0.07502274 | 0.128569609 | 0.136734817 | TGA3 |
| BIM3 | 0.5910135 | 0.02465899 | 0.051597420 | 0.22624226 | 0.12588493 | 0.060461807 | 0.024197811 | 0.00000000 | 0.000000000 | 0.037090713 | 0.040879601 | AT5G38860 | 0.35212719 | 0.07625641 | 0.08465962 | 0.113347120 | 0.077970314 | BIM3 |
| AT5G43530 | 0.6133244 | 0.14625420 | 0.119769012 | 0.14882405 | 0.15912259 | 0.039354577 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G43530 | 0.30794664 | 0.26602321 | 0.03935458 | 0.266023208 | 0.000000000 | AT5G43530 |
| NSI | 0.4786957 | 0.06990425 | 0.079664129 | 0.12755403 | 0.12785536 | 0.023029209 | 0.024790483 | 0.00000000 | 0.007935578 | 0.000000000 | 0.017962618 | AT1G32070 | 0.25540939 | 0.14956838 | 0.05575527 | 0.149568376 | 0.017962618 | NSI |
| EPR1 | 0.4281435 | 0.00000000 | 0.000000000 | 0.11887608 | 0.13018644 | 0.020861604 | 0.017112362 | 0.08237797 | 0.000000000 | 0.007873928 | 0.050855067 | AT1G18330 | 0.24906252 | 0.00000000 | 0.12035194 | 0.007873928 | 0.058728995 | EPR1 |
| NF-YA2 | 0.1928269 | 0.00000000 | 0.000000000 | 0.03649635 | 0.06719679 | 0.033387370 | 0.055746427 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G05690 | 0.10369314 | 0.00000000 | 0.08913380 | 0.000000000 | 0.000000000 | NF-YA2 |
| SUVR5 | 0.1191541 | 0.00000000 | 0.000000000 | 0.01222965 | 0.05468312 | 0.006975001 | 0.003237423 | 0.00000000 | 0.000000000 | 0.000000000 | 0.042028910 | AT2G23740 | 0.06691277 | 0.00000000 | 0.01021242 | 0.000000000 | 0.042028910 | SUVR5 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(ground_rank[1:10,], aes(x=reorder(GeneName, ground, decreasing = FALSE), y=ground)) + geom_point(size=4)+
labs(title="Ground Tissue-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(ground_rank,"Ground_Tissue_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- ground_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Ground Tissue ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
epi_rank <- bc_rank[which(bc_rank$epi*2 > bc_rank$all),]%>% arrange(desc(epi))
epi_rank <- epi_rank[-c(match(rownames(atri_rank), rownames(epi_rank)),match(rownames(tri_rank), rownames(epi_rank))),]
epi_rank$GeneName <- rownames(epi_rank)
epi_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| KDR | 15.63637057 | 5.50850153 | 5.72027010 | 0.836563394 | 0.427781125 | 0.095169474 | 0.000000000 | 0.00000000 | 0.000000000 | 2.997848939 | 0.050236005 | AT1G26945 | 1.264344519 | 11.22877163 | 0.095169474 | 14.22662057 | 3.048084944 | KDR |
| MYB23 | 17.41583495 | 7.91650475 | 3.14725289 | 1.032895899 | 0.214463455 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 5.011080445 | 0.093637514 | AT5G40330 | 1.247359354 | 11.06375763 | 0.000000000 | 16.07483808 | 5.104717959 | MYB23 |
| ATS | 17.65096816 | 5.17751248 | 4.08309220 | 1.121933126 | 0.820489845 | 0.047344564 | 0.000000000 | 0.00000000 | 0.000000000 | 6.028496767 | 0.372099180 | AT5G42630 | 1.942422971 | 9.26060468 | 0.047344564 | 15.28910145 | 6.400595947 | ATS |
| ARR5 | 9.75929636 | 4.35875276 | 3.80574116 | 0.238071851 | 0.192309442 | 0.014950033 | 0.167717646 | 0.00000000 | 0.168027211 | 0.489912867 | 0.323813394 | AT3G48100 | 0.430381293 | 8.16449392 | 0.350694890 | 8.65440679 | 0.813726262 | ARR5 |
| ATMYC1 | 9.80811233 | 3.70117609 | 4.34305282 | 1.095044031 | 0.562222780 | 0.106616602 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT4G00480 | 1.657266811 | 8.04422891 | 0.106616602 | 8.04422891 | 0.000000000 | ATMYC1 |
| ATHB13 | 13.41075230 | 3.89415528 | 3.69945422 | 1.352345733 | 1.251681506 | 0.670197321 | 0.352521349 | 0.00000000 | 0.318160955 | 1.829539903 | 0.042696030 | AT1G69780 | 2.604027239 | 7.59360950 | 1.340879625 | 9.42314941 | 1.872235933 | ATHB13 |
| RSL1 | 7.39076516 | 3.28965109 | 3.21992453 | 0.418898344 | 0.457088570 | 0.005202625 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT5G37800 | 0.875986914 | 6.50957562 | 0.005202625 | 6.50957562 | 0.000000000 | RSL1 |
| NFL | 10.88309411 | 3.63496826 | 2.68247443 | 1.268092591 | 1.101495379 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 1.922524399 | 0.273539040 | AT5G65640 | 2.369587970 | 6.31744270 | 0.000000000 | 8.23996710 | 2.196063439 | NFL |
| GATA12 | 12.17640944 | 1.81910371 | 4.49478753 | 0.108824050 | 0.000000000 | 0.261791106 | 0.306764326 | 4.28527569 | 0.407810048 | 0.400064128 | 0.091988854 | AT5G25830 | 0.108824050 | 6.31389124 | 5.261641170 | 6.71395537 | 0.492052982 | GATA12 |
| EGL3 | 8.38759348 | 3.39927159 | 2.39422405 | 1.477131504 | 1.008861335 | 0.108105000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G63650 | 2.485992838 | 5.79349564 | 0.108105000 | 5.79349564 | 0.000000000 | EGL3 |
| TRY | 8.88411246 | 4.41784935 | 0.63863608 | 1.319968497 | 0.752182303 | 0.088667884 | 0.000000000 | 0.00000000 | 0.008954135 | 1.657854209 | 0.000000000 | AT5G53200 | 2.072150800 | 5.05648544 | 0.097622019 | 6.71433965 | 1.657854209 | TRY |
| WRKY72 | 4.01793743 | 1.67680162 | 1.16332672 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.826636469 | 0.351172610 | AT5G15130 | 0.000000000 | 2.84012835 | 0.000000000 | 3.66676482 | 1.177809079 | WRKY72 |
| WRKY27 | 5.21805179 | 2.56543911 | 0.17533706 | 0.063625111 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 2.351739160 | 0.061911349 | AT5G52830 | 0.063625111 | 2.74077617 | 0.000000000 | 5.09251533 | 2.413650509 | WRKY27 |
| OFP13 | 3.05215018 | 0.83208007 | 1.48386853 | 0.432309283 | 0.151962828 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.124689823 | 0.027239642 | AT5G04820 | 0.584272111 | 2.31594860 | 0.000000000 | 2.44063842 | 0.151929464 | OFP13 |
| AT5G06550 | 4.43491076 | 1.11658778 | 1.15662566 | 0.482720262 | 1.101944160 | 0.394482823 | 0.000000000 | 0.00000000 | 0.000000000 | 0.153388934 | 0.029161143 | AT5G06550 | 1.584664421 | 2.27321344 | 0.394482823 | 2.42660237 | 0.182550077 | AT5G06550 |
| MYB50 | 4.16385948 | 1.90349196 | 0.26344782 | 0.063898110 | 0.000000000 | 0.000000000 | 0.015123526 | 1.78048309 | 0.137414966 | 0.000000000 | 0.000000000 | AT1G57560 | 0.063898110 | 2.16693978 | 1.933021586 | 2.16693978 | 0.000000000 | MYB50 |
| AT5G61590 | 4.05696819 | 1.76770185 | 0.36349147 | 0.374509616 | 0.308601276 | 0.616218495 | 0.349628095 | 0.00000000 | 0.267143654 | 0.009673731 | 0.000000000 | AT5G61590 | 0.683110892 | 2.13119332 | 1.232990245 | 2.14086705 | 0.009673731 | AT5G61590 |
| AT4G26810 | 2.94057549 | 1.28035975 | 0.65485347 | 0.142988506 | 0.351305180 | 0.364657711 | 0.129460206 | 0.00000000 | 0.000000000 | 0.016950663 | 0.000000000 | AT4G26810 | 0.494293685 | 1.93521322 | 0.494117917 | 1.95216388 | 0.016950663 | AT4G26810 |
| AT1G68670 | 3.37214158 | 0.60801261 | 1.32361005 | 0.000000000 | 0.057710857 | 0.002360119 | 0.000000000 | 0.00000000 | 0.238223060 | 0.680876039 | 0.461348839 | AT1G68670 | 0.057710857 | 1.93162266 | 0.240583180 | 2.61249870 | 1.142224878 | AT1G68670 |
| HFR1 | 2.46317247 | 1.01909707 | 0.76336647 | 0.506799807 | 0.167100660 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.000000000 | 0.006808466 | AT1G02340 | 0.673900468 | 1.78246354 | 0.000000000 | 1.78246354 | 0.006808466 | HFR1 |
| ZF1 | 2.57285669 | 0.44103254 | 1.12693894 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.65073785 | 0.000000000 | 0.333512717 | 0.020634643 | AT5G67450 | 0.000000000 | 1.56797148 | 0.650737852 | 1.90148420 | 0.354147360 | ZF1 |
| AT2G18670 | 1.70001397 | 0.82463375 | 0.34650347 | 0.266462317 | 0.021644938 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.139943867 | 0.100825634 | AT2G18670 | 0.288107255 | 1.17113722 | 0.000000000 | 1.31108108 | 0.240769500 | AT2G18670 |
| NAC053 | 2.29336396 | 0.74177277 | 0.42063908 | 0.100847469 | 0.036126970 | 0.000000000 | 0.000000000 | 0.16401253 | 0.004556113 | 0.414178361 | 0.411230667 | AT3G10500 | 0.136974439 | 1.16241185 | 0.168568646 | 1.57659021 | 0.825409028 | NAC053 |
| AT5G13780 | 1.99613918 | 0.44642879 | 0.60102711 | 0.069849691 | 0.066129085 | 0.353646923 | 0.230056062 | 0.11311248 | 0.053463795 | 0.025717884 | 0.036707360 | AT5G13780 | 0.135978775 | 1.04745590 | 0.750279257 | 1.07317379 | 0.062425244 | AT5G13780 |
| HB16 | 1.87511366 | 0.20570482 | 0.77338062 | 0.567630331 | 0.215291113 | 0.023105528 | 0.017271060 | 0.00000000 | 0.004556113 | 0.010311318 | 0.057862761 | AT4G40060 | 0.782921444 | 0.97908544 | 0.044932700 | 0.98939676 | 0.068174080 | HB16 |
| MED6 | 1.30860388 | 0.39651870 | 0.57798730 | 0.043900115 | 0.091479439 | 0.069739039 | 0.023713302 | 0.00000000 | 0.038811917 | 0.031536178 | 0.034917888 | AT3G21350 | 0.135379554 | 0.97450600 | 0.132264259 | 1.00604218 | 0.066454065 | MED6 |
| DEL3 | 1.69378156 | 0.46389094 | 0.49540214 | 0.084526967 | 0.085062184 | 0.096845365 | 0.000000000 | 0.27360170 | 0.000000000 | 0.175128009 | 0.019324260 | AT3G01330 | 0.169589151 | 0.95929307 | 0.370447068 | 1.13442108 | 0.194452269 | DEL3 |
| LOL2 | 1.43289572 | 0.57018972 | 0.38671468 | 0.089761273 | 0.051756184 | 0.051954907 | 0.000000000 | 0.00000000 | 0.012280090 | 0.180933472 | 0.089305405 | AT4G21610 | 0.141517457 | 0.95690439 | 0.064234996 | 1.13783787 | 0.270238877 | LOL2 |
| ERF104 | 1.55884430 | 0.48371345 | 0.37942088 | 0.048994123 | 0.098413189 | 0.228545929 | 0.157862770 | 0.00000000 | 0.000000000 | 0.118491503 | 0.043402452 | AT5G61600 | 0.147407312 | 0.86313434 | 0.386408698 | 0.98162584 | 0.161893955 | ERF104 |
| ORC1B | 1.40586762 | 0.48452830 | 0.37131807 | 0.057648099 | 0.070220036 | 0.177429140 | 0.029184181 | 0.13505298 | 0.020068027 | 0.055870217 | 0.004548579 | AT4G12620 | 0.127868135 | 0.85584636 | 0.361734327 | 0.91171658 | 0.060418796 | ORC1B |
| NF-YC10 | 1.13287856 | 0.34202064 | 0.40452676 | 0.081250553 | 0.165004904 | 0.023468601 | 0.000000000 | 0.00000000 | 0.004556113 | 0.042649464 | 0.069401524 | AT1G07980 | 0.246255457 | 0.74654740 | 0.028024713 | 0.78919686 | 0.112050987 | NF-YC10 |
| LSD1 | 1.22257045 | 0.19401863 | 0.48263270 | 0.013510450 | 0.044027108 | 0.009240825 | 0.029977546 | 0.00000000 | 0.044529545 | 0.124384092 | 0.280249549 | AT4G20380 | 0.057537558 | 0.67665134 | 0.083747916 | 0.80103543 | 0.404633641 | LSD1 |
| AT1G61990 | 1.09627751 | 0.29892990 | 0.37235986 | 0.154341291 | 0.131479722 | 0.117897316 | 0.005392596 | 0.00000000 | 0.000000000 | 0.000000000 | 0.015876819 | AT1G61990 | 0.285821013 | 0.67128976 | 0.123289912 | 0.67128976 | 0.015876819 | AT1G61990 |
| MBD6 | 0.99939397 | 0.19527047 | 0.45850882 | 0.092873563 | 0.090353997 | 0.100956187 | 0.000000000 | 0.02308060 | 0.002199011 | 0.007873928 | 0.028277393 | AT5G59380 | 0.183227560 | 0.65377929 | 0.126235796 | 0.66165322 | 0.036151321 | MBD6 |
| AT3G55080 | 1.11758451 | 0.36882271 | 0.20671774 | 0.194376658 | 0.129178625 | 0.094622245 | 0.000000000 | 0.00000000 | 0.000000000 | 0.110047964 | 0.013818567 | AT3G55080 | 0.323555283 | 0.57554045 | 0.094622245 | 0.68558841 | 0.123866532 | AT3G55080 |
| RSZ22a | 1.06330763 | 0.27118004 | 0.27139636 | 0.000000000 | 0.130295883 | 0.187715841 | 0.000000000 | 0.00000000 | 0.052750487 | 0.106173037 | 0.043795981 | AT2G24590 | 0.130295883 | 0.54257640 | 0.240466328 | 0.64874944 | 0.149969018 | RSZ22a |
| AT3G05760 | 0.82701523 | 0.14552572 | 0.34630135 | 0.000000000 | 0.035799802 | 0.062511018 | 0.062391145 | 0.05375433 | 0.058549157 | 0.008987638 | 0.053195073 | AT3G05760 | 0.035799802 | 0.49182708 | 0.237205646 | 0.50081471 | 0.062182710 | AT3G05760 |
| WRKY3 | 0.83517100 | 0.23339726 | 0.25165891 | 0.000000000 | 0.003827751 | 0.000000000 | 0.022825760 | 0.00000000 | 0.030647791 | 0.118328657 | 0.174484864 | AT2G03340 | 0.003827751 | 0.48505618 | 0.053473551 | 0.60338484 | 0.292813520 | WRKY3 |
| HB23 | 0.71949770 | 0.16367781 | 0.31742843 | 0.000000000 | 0.050938646 | 0.000000000 | 0.021180464 | 0.05784531 | 0.108427034 | 0.000000000 | 0.000000000 | AT5G39760 | 0.050938646 | 0.48110624 | 0.187452813 | 0.48110624 | 0.000000000 | HB23 |
| ATMAK3 | 0.78119836 | 0.29346665 | 0.15864409 | 0.012275158 | 0.075267666 | 0.049911134 | 0.034977491 | 0.00000000 | 0.004556113 | 0.140329779 | 0.011770281 | AT2G38130 | 0.087542823 | 0.45211074 | 0.089444738 | 0.59244052 | 0.152100060 | ATMAK3 |
| MBD4 | 0.82192013 | 0.24648883 | 0.17721168 | 0.008146673 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.218614167 | 0.171458782 | AT3G63030 | 0.008146673 | 0.42370051 | 0.000000000 | 0.64231467 | 0.390072949 | MBD4 |
| AT5G28300 | 0.63657257 | 0.26760001 | 0.15325679 | 0.148011863 | 0.005741627 | 0.000000000 | 0.000000000 | 0.00000000 | 0.032480199 | 0.029482081 | 0.000000000 | AT5G28300 | 0.153753490 | 0.42085680 | 0.032480199 | 0.45033888 | 0.029482081 | AT5G28300 |
| AT1G76110 | 0.73035755 | 0.11297715 | 0.29241386 | 0.078302387 | 0.173964740 | 0.031439010 | 0.009497407 | 0.00000000 | 0.000000000 | 0.031763003 | 0.000000000 | AT1G76110 | 0.252267127 | 0.40539101 | 0.040936417 | 0.43715401 | 0.031763003 | AT1G76110 |
| NPR1 | 0.70242534 | 0.13965071 | 0.24574478 | 0.045110396 | 0.046378011 | 0.004567734 | 0.005749782 | 0.00000000 | 0.000000000 | 0.058166371 | 0.157057553 | AT1G64280 | 0.091488407 | 0.38539550 | 0.010317516 | 0.44356187 | 0.215223923 | NPR1 |
| RAD54 | 0.31770260 | 0.14839746 | 0.12483589 | 0.000000000 | 0.000000000 | 0.007766728 | 0.000000000 | 0.00000000 | 0.000000000 | 0.025101594 | 0.011600918 | AT3G19210 | 0.000000000 | 0.27323336 | 0.007766728 | 0.29833495 | 0.036702511 | RAD54 |
| KAPP | 0.38198942 | 0.08954099 | 0.17377527 | 0.015568843 | 0.029638329 | 0.002360119 | 0.006470182 | 0.00000000 | 0.010133380 | 0.000000000 | 0.054502311 | AT5G19280 | 0.045207172 | 0.26331625 | 0.018963682 | 0.26331625 | 0.054502311 | KAPP |
| BEH4 | 0.47379993 | 0.19259354 | 0.06072757 | 0.105894003 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.068453544 | 0.046131270 | AT1G78700 | 0.105894003 | 0.25332111 | 0.000000000 | 0.32177465 | 0.114584814 | BEH4 |
| SDG40 | 0.50071456 | 0.06691592 | 0.18389081 | 0.038337754 | 0.006698565 | 0.128588147 | 0.002159837 | 0.03629277 | 0.000000000 | 0.017462969 | 0.020367788 | AT5G17240 | 0.045036319 | 0.25080672 | 0.167040758 | 0.26826969 | 0.037830757 | SDG40 |
| PUX2 | 0.45500267 | 0.09083881 | 0.15158815 | 0.038899216 | 0.076819385 | 0.003446658 | 0.011747163 | 0.00000000 | 0.006914603 | 0.027064963 | 0.047683717 | AT2G01650 | 0.115718600 | 0.24242697 | 0.022108423 | 0.26949193 | 0.074748680 | PUX2 |
| CHR8 | 0.36472498 | 0.08129574 | 0.15186503 | 0.000000000 | 0.024968358 | 0.015266569 | 0.020145951 | 0.00000000 | 0.008800378 | 0.000000000 | 0.062382958 | AT2G18760 | 0.024968358 | 0.23316077 | 0.044212898 | 0.23316077 | 0.062382958 | CHR8 |
| AT5G26749 | 0.28158564 | 0.11639400 | 0.05797125 | 0.000000000 | 0.058357436 | 0.026133672 | 0.016993675 | 0.00000000 | 0.000000000 | 0.005735605 | 0.000000000 | AT5G26749 | 0.058357436 | 0.17436525 | 0.043127347 | 0.18010086 | 0.005735605 | AT5G26749 |
| PRR9 | 0.25641187 | 0.04184015 | 0.09924032 | 0.048311229 | 0.006698565 | 0.000000000 | 0.004425279 | 0.00000000 | 0.000000000 | 0.030979971 | 0.024916367 | AT2G46790 | 0.055009794 | 0.14108046 | 0.004425279 | 0.17206043 | 0.055896338 | PRR9 |
| EMB2219 | 0.18136003 | 0.07410954 | 0.03446078 | 0.000000000 | 0.029574962 | 0.016040059 | 0.007074285 | 0.00000000 | 0.000000000 | 0.000000000 | 0.020100406 | AT2G21710 | 0.029574962 | 0.10857031 | 0.023114344 | 0.10857031 | 0.020100406 | EMB2219 |
| AT2G46040 | 0.16369601 | 0.01823264 | 0.06883869 | 0.006114153 | 0.025486950 | 0.007766728 | 0.000000000 | 0.00000000 | 0.004556113 | 0.004365742 | 0.028335003 | AT2G46040 | 0.031601103 | 0.08707132 | 0.012322840 | 0.09143707 | 0.032700745 | AT2G46040 |
| AT3G51180 | 0.11114410 | 0.04024887 | 0.02705086 | 0.000000000 | 0.029753047 | 0.002360119 | 0.011731201 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G51180 | 0.029753047 | 0.06729974 | 0.014091321 | 0.06729974 | 0.000000000 | AT3G51180 |
| AT1G61960 | 0.07369076 | 0.01928682 | 0.03022349 | 0.000000000 | 0.002870813 | 0.010135432 | 0.000000000 | 0.00000000 | 0.000000000 | 0.004365742 | 0.006808466 | AT1G61960 | 0.002870813 | 0.04951031 | 0.010135432 | 0.05387605 | 0.011174208 | AT1G61960 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(epi_rank[1:10,], aes(x=reorder(GeneName, epi, decreasing = FALSE), y=epi)) + geom_point(size=4)+
labs(title="Epidermis-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(epi_rank,"Epidermis_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- epi_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Epidermis ", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
epilrc_rank <- bc_rank[which(bc_rank$epilrc*2 > bc_rank$all),]%>% arrange(desc(epilrc))
epilrc_rank <- epilrc_rank[-c(match(rownames(atri_rank), rownames(epilrc_rank)),match(rownames(tri_rank), rownames(epilrc_rank)),match(rownames(lrc_rank), rownames(epilrc_rank))),]
epilrc_rank$GeneName <- rownames(epilrc_rank)
epilrc_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| GATA2 | 30.677473 | 7.8534131 | 5.533161034 | 2.4451137 | 1.38259307 | 0.50181676 | 0.08967606 | 0.05936252 | 0.462778785 | 10.4048628 | 1.94469509 | AT2G45050 | 3.8277068 | 13.3865741 | 1.11363412 | 23.791437 | 12.3495579 | GATA2 |
| HAT7 | 32.324147 | 7.0540648 | 5.626398815 | 8.9965981 | 4.91031527 | 0.02122024 | 0.00000000 | 0.00000000 | 0.000000000 | 4.4330601 | 1.28248975 | AT5G15150 | 13.9069134 | 12.6804636 | 0.02122024 | 17.113524 | 5.7155498 | HAT7 |
| MYB23 | 17.415835 | 7.9165047 | 3.147252887 | 1.0328959 | 0.21446346 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 5.0110804 | 0.09363751 | AT5G40330 | 1.2473594 | 11.0637576 | 0.00000000 | 16.074838 | 5.1047180 | MYB23 |
| CRF2 | 28.881788 | 4.5879796 | 2.175573608 | 2.2096198 | 1.70007169 | 2.54559752 | 0.39109962 | 0.15510466 | 2.724359039 | 8.9251989 | 3.46718327 | AT4G23750 | 3.9096915 | 6.7635533 | 5.81616083 | 15.688752 | 12.3923822 | CRF2 |
| ATS | 17.650968 | 5.1775125 | 4.083092197 | 1.1219331 | 0.82048984 | 0.04734456 | 0.00000000 | 0.00000000 | 0.000000000 | 6.0284968 | 0.37209918 | AT5G42630 | 1.9424230 | 9.2606047 | 0.04734456 | 15.289101 | 6.4005959 | ATS |
| BT2 | 21.716559 | 4.2550728 | 1.229291484 | 0.2692809 | 0.01052632 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 9.1867705 | 6.76561708 | AT3G48360 | 0.2798072 | 5.4843643 | 0.00000000 | 14.671135 | 15.9523876 | BT2 |
| NAI1 | 25.350401 | 3.3551095 | 0.367456996 | 1.2531594 | 0.05930131 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 10.7691324 | 9.54624150 | AT2G22770 | 1.3124607 | 3.7225665 | 0.00000000 | 14.491699 | 20.3153739 | NAI1 |
| CRF3 | 20.564564 | 3.2745045 | 2.361877234 | 1.3429950 | 0.89743390 | 0.18772725 | 0.02324283 | 0.00000000 | 0.000000000 | 8.6413544 | 3.83542869 | AT5G53290 | 2.2404289 | 5.6363817 | 0.21097009 | 14.277736 | 12.4767830 | CRF3 |
| KDR | 15.636371 | 5.5085015 | 5.720270099 | 0.8365634 | 0.42778112 | 0.09516947 | 0.00000000 | 0.00000000 | 0.000000000 | 2.9978489 | 0.05023601 | AT1G26945 | 1.2643445 | 11.2287716 | 0.09516947 | 14.226621 | 3.0480849 | KDR |
| WER | 20.004146 | 5.1075406 | 2.647926229 | 2.2659865 | 1.96000982 | 1.38211375 | 0.00000000 | 0.00000000 | 0.000000000 | 5.9792996 | 0.66126914 | AT5G14750 | 4.2259963 | 7.7554669 | 1.38211375 | 13.734766 | 6.6405687 | WER |
| PLT1 | 22.943416 | 3.5738055 | 0.000000000 | 2.5921178 | 1.95860508 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 9.2834430 | 5.53544462 | AT3G20840 | 4.5507229 | 3.5738055 | 0.00000000 | 12.857248 | 14.8188876 | PLT1 |
| GATA4 | 18.285184 | 5.5129595 | 2.390551292 | 2.8503033 | 2.11585510 | 0.20661265 | 0.03511474 | 0.11214608 | 0.113605442 | 4.7034241 | 0.24461154 | AT3G60530 | 4.9661584 | 7.9035108 | 0.46747892 | 12.606935 | 4.9480356 | GATA4 |
| SMB | 19.125611 | 4.2433488 | 0.000000000 | 1.5820659 | 0.17768211 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 7.8072892 | 5.31522494 | AT1G79580 | 1.7597480 | 4.2433488 | 0.00000000 | 12.050638 | 13.1225142 | SMB |
| BRON | 19.061757 | 2.9381675 | 0.903218088 | 1.8428956 | 0.95924294 | 0.03377985 | 0.00000000 | 0.00000000 | 0.000000000 | 7.6392464 | 4.74520673 | AT1G75710 | 2.8021385 | 3.8413856 | 0.03377985 | 11.480632 | 12.3844532 | BRON |
| TMO7 | 20.423556 | 5.3293805 | 2.559039942 | 3.1713960 | 0.57305235 | 0.74175960 | 0.00000000 | 0.00000000 | 0.004556113 | 3.3049149 | 4.73945683 | AT1G74500 | 3.7444483 | 7.8884204 | 0.74631571 | 11.193335 | 8.0443717 | TMO7 |
| ERF9 | 15.875276 | 3.2978012 | 1.303157918 | 1.5582184 | 0.17717644 | 1.03249249 | 0.03976590 | 1.52275919 | 0.062244898 | 5.8737052 | 1.00795472 | AT5G44210 | 1.7353948 | 4.6009591 | 2.65726248 | 10.474664 | 6.8816599 | ERF9 |
| LBD15 | 18.810274 | 1.9153651 | 0.007969035 | 0.6176195 | 0.00000000 | 0.00000000 | 0.00000000 | 2.30414675 | 0.000000000 | 8.5011616 | 5.46401160 | AT2G40470 | 0.6176195 | 1.9233341 | 2.30414675 | 10.424496 | 13.9651732 | LBD15 |
| ATHB13 | 13.410752 | 3.8941553 | 3.699454220 | 1.3523457 | 1.25168151 | 0.67019732 | 0.35252135 | 0.00000000 | 0.318160955 | 1.8295399 | 0.04269603 | AT1G69780 | 2.6040272 | 7.5936095 | 1.34087963 | 9.423149 | 1.8722359 | ATHB13 |
| RITF1 | 17.573349 | 3.9313725 | 1.652504912 | 2.4842532 | 1.92087708 | 1.91999519 | 0.00000000 | 0.00000000 | 0.000000000 | 3.6202586 | 2.04408737 | AT2G12646 | 4.4051303 | 5.5838774 | 1.91999519 | 9.204136 | 5.6643460 | RITF1 |
| AT1G26680 | 17.203575 | 0.3927038 | 0.000000000 | 1.7351848 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 8.4961376 | 6.57954848 | AT1G26680 | 1.7351848 | 0.3927038 | 0.00000000 | 8.888841 | 15.0756860 | AT1G26680 |
| NAC094 | 15.991661 | 3.5020507 | 0.000000000 | 2.1185459 | 1.22356383 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 5.2559830 | 3.89151757 | AT5G39820 | 3.3421097 | 3.5020507 | 0.00000000 | 8.758034 | 9.1475006 | NAC094 |
| ARR5 | 9.759296 | 4.3587528 | 3.805741157 | 0.2380719 | 0.19230944 | 0.01495003 | 0.16771765 | 0.00000000 | 0.168027211 | 0.4899129 | 0.32381339 | AT3G48100 | 0.4303813 | 8.1644939 | 0.35069489 | 8.654407 | 0.8137263 | ARR5 |
| FEZ | 16.902047 | 3.6356756 | 0.000000000 | 2.4628387 | 2.07276093 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 4.9090076 | 3.82176365 | AT1G26870 | 4.5355997 | 3.6356756 | 0.00000000 | 8.544683 | 8.7307713 | FEZ |
| GATA17L | 14.982029 | 2.7267364 | 1.720431414 | 1.9530114 | 1.39698574 | 2.00184546 | 0.10007701 | 0.02308060 | 0.000000000 | 3.8564422 | 1.20341848 | AT4G16141 | 3.3499972 | 4.4471678 | 2.12500306 | 8.303610 | 5.0598607 | GATA17L |
| NFL | 10.883094 | 3.6349683 | 2.682474434 | 1.2680926 | 1.10149538 | 0.00000000 | 0.00000000 | 0.00000000 | 0.000000000 | 1.9225244 | 0.27353904 | AT5G65640 | 2.3695880 | 6.3174427 | 0.00000000 | 8.239967 | 2.1960634 | NFL |
| ATMYC1 | 9.808112 | 3.7011761 | 4.343052820 | 1.0950440 | 0.56222278 | 0.10661660 | 0.00000000 | 0.00000000 | 0.000000000 | 0.0000000 | 0.00000000 | AT4G00480 | 1.6572668 | 8.0442289 | 0.10661660 | 8.044229 | 0.0000000 | ATMYC1 |
| EEL | 12.245219 | 2.7984407 | 0.000000000 | 1.4599654 | 0.38018280 | 0.07532643 | 0.00000000 | 0.00000000 | 0.000000000 | 5.2091292 | 2.32217441 | AT2G41070 | 1.8401482 | 2.7984407 | 0.07532643 | 8.007570 | 7.5313036 | EEL |
| GATA17 | 12.698020 | 3.1544619 | 1.965477179 | 1.7138198 | 1.72850710 | 1.27124372 | 0.00000000 | 0.00000000 | 0.000000000 | 2.6483608 | 0.21614945 | AT3G16870 | 3.4423269 | 5.1199391 | 1.27124372 | 7.768300 | 2.8645103 | GATA17 |
| WRKY17 | 11.752376 | 2.1393064 | 1.385138128 | 1.0072679 | 0.55127636 | 0.16125705 | 0.10230446 | 1.23415275 | 0.150082151 | 4.1620318 | 0.85955851 | AT2G24570 | 1.5585443 | 3.5244445 | 1.64779641 | 7.686476 | 5.0215903 | WRKY17 |
| ZFP5 | 14.793854 | 2.2673463 | 0.152957279 | 0.0000000 | 0.00000000 | 0.07725790 | 0.24114298 | 3.43745358 | 0.133673469 | 5.0787528 | 3.40526939 | AT1G10480 | 0.0000000 | 2.4203036 | 3.88952793 | 7.499056 | 8.4840222 | ZFP5 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| AT3G53440 | 0.33941772 | 0.04925169 | 0.097559758 | 0.000000000 | 0.028147841 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.110430916 | 0.054027516 | AT3G53440 | 0.028147841 | 0.14681144 | 0.000000000 | 0.25724236 | 0.164458432 | AT3G53440 |
| AT3G07670 | 0.43754447 | 0.17874250 | 0.021748913 | 0.040707339 | 0.025843925 | 0.053796999 | 0.035114739 | 0.00000000 | 0.003359876 | 0.048624568 | 0.029605610 | AT3G07670 | 0.066551264 | 0.20049141 | 0.092271614 | 0.24911598 | 0.078230178 | AT3G07670 |
| AT1G72030 | 0.44316473 | 0.20052069 | 0.000000000 | 0.094500442 | 0.000000000 | 0.026310804 | 0.000000000 | 0.00000000 | 0.000000000 | 0.034285772 | 0.087547030 | AT1G72030 | 0.094500442 | 0.20052069 | 0.026310804 | 0.23480646 | 0.121832801 | AT1G72030 |
| AT1G60700 | 0.37897676 | 0.12119459 | 0.066048781 | 0.026065429 | 0.039091123 | 0.000000000 | 0.005975666 | 0.04612863 | 0.023967719 | 0.047057380 | 0.003447441 | AT1G60700 | 0.065156552 | 0.18724337 | 0.076072011 | 0.23430075 | 0.050504821 | AT1G60700 |
| CHR8 | 0.36472498 | 0.08129574 | 0.151865025 | 0.000000000 | 0.024968358 | 0.015266569 | 0.020145951 | 0.00000000 | 0.008800378 | 0.000000000 | 0.062382958 | AT2G18760 | 0.024968358 | 0.23316077 | 0.044212898 | 0.23316077 | 0.062382958 | CHR8 |
| AT3G52100 | 0.46382052 | 0.05644215 | 0.096780854 | 0.024250893 | 0.074519252 | 0.013750992 | 0.016993675 | 0.00000000 | 0.010316398 | 0.078991278 | 0.091775026 | AT3G52100 | 0.098770145 | 0.15322300 | 0.041061065 | 0.23221428 | 0.170766304 | AT3G52100 |
| AT3G21810 | 0.39703523 | 0.10712582 | 0.046297170 | 0.000000000 | 0.005741627 | 0.005975486 | 0.011010394 | 0.00000000 | 0.034081192 | 0.073122846 | 0.113680699 | AT3G21810 | 0.005741627 | 0.15342299 | 0.051067072 | 0.22654583 | 0.186803545 | AT3G21810 |
| TRFL7 | 0.43307984 | 0.09031958 | 0.017324134 | 0.060654288 | 0.026160354 | 0.067634125 | 0.002159837 | 0.00000000 | 0.000000000 | 0.118821956 | 0.050005565 | AT1G06910 | 0.086814642 | 0.10764372 | 0.069793962 | 0.22646567 | 0.168827520 | TRFL7 |
| AT1G19490 | 0.41042627 | 0.02808975 | 0.006853837 | 0.012272325 | 0.003827751 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.191450585 | 0.167932023 | AT1G19490 | 0.016100077 | 0.03494358 | 0.000000000 | 0.22639417 | 0.359382608 | AT1G19490 |
| AT1G77250 | 0.38779598 | 0.03085115 | 0.058274008 | 0.022148446 | 0.055871591 | 0.010655722 | 0.010085824 | 0.00000000 | 0.002199011 | 0.107642409 | 0.090067819 | AT1G77250 | 0.078020037 | 0.08912515 | 0.022940557 | 0.19676756 | 0.197710228 | AT1G77250 |
| HAT3.1 | 0.37652484 | 0.03015349 | 0.101703625 | 0.000000000 | 0.004784689 | 0.028590476 | 0.013207632 | 0.03694286 | 0.022360760 | 0.062872448 | 0.075908860 | AT3G19510 | 0.004784689 | 0.13185712 | 0.101101723 | 0.19472957 | 0.138781308 | HAT3.1 |
| LSMT-L | 0.27575885 | 0.06035469 | 0.005184388 | 0.017127618 | 0.000000000 | 0.000000000 | 0.000000000 | 0.01647994 | 0.000000000 | 0.124557552 | 0.052054663 | AT1G14030 | 0.017127618 | 0.06553908 | 0.016479937 | 0.19009663 | 0.176612214 | LSMT-L |
| AT3G46950 | 0.35653805 | 0.13407905 | 0.039635518 | 0.135879752 | 0.000000000 | 0.014406072 | 0.007547768 | 0.00000000 | 0.000000000 | 0.009026657 | 0.015963234 | AT3G46950 | 0.135879752 | 0.17371456 | 0.021953841 | 0.18274122 | 0.024989891 | AT3G46950 |
| AT5G26749 | 0.28158564 | 0.11639400 | 0.057971249 | 0.000000000 | 0.058357436 | 0.026133672 | 0.016993675 | 0.00000000 | 0.000000000 | 0.005735605 | 0.000000000 | AT5G26749 | 0.058357436 | 0.17436525 | 0.043127347 | 0.18010086 | 0.005735605 | AT5G26749 |
| NBS1 | 0.26011518 | 0.05899116 | 0.059317219 | 0.045305040 | 0.000000000 | 0.021751007 | 0.000000000 | 0.00000000 | 0.000000000 | 0.055311277 | 0.019439480 | AT3G02680 | 0.045305040 | 0.11830838 | 0.021751007 | 0.17361966 | 0.074750757 | NBS1 |
| PRR9 | 0.25641187 | 0.04184015 | 0.099240316 | 0.048311229 | 0.006698565 | 0.000000000 | 0.004425279 | 0.00000000 | 0.000000000 | 0.030979971 | 0.024916367 | AT2G46790 | 0.055009794 | 0.14108046 | 0.004425279 | 0.17206043 | 0.055896338 | PRR9 |
| CPSF30 | 0.30067750 | 0.01615208 | 0.070264994 | 0.000000000 | 0.023109800 | 0.026778052 | 0.013523434 | 0.00000000 | 0.005558887 | 0.070937865 | 0.074352390 | AT1G30460 | 0.023109800 | 0.08641707 | 0.045860374 | 0.15735494 | 0.145290255 | CPSF30 |
| AT2G20110 | 0.28193951 | 0.03524579 | 0.000000000 | 0.000000000 | 0.004784689 | 0.002528828 | 0.000000000 | 0.00000000 | 0.000000000 | 0.107954546 | 0.131425650 | AT2G20110 | 0.004784689 | 0.03524579 | 0.002528828 | 0.14320034 | 0.239380196 | AT2G20110 |
| SUVH5 | 0.24427634 | 0.05090729 | 0.062404189 | 0.048346596 | 0.040713407 | 0.005202625 | 0.000000000 | 0.00000000 | 0.014875358 | 0.014989602 | 0.006837271 | AT2G35160 | 0.089060003 | 0.11331148 | 0.020077983 | 0.12830108 | 0.021826873 | SUVH5 |
| AT5G07400 | 0.17234180 | 0.00000000 | 0.085120744 | 0.027621574 | 0.004784689 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.027638536 | 0.027176254 | AT5G07400 | 0.032406263 | 0.08512074 | 0.000000000 | 0.11275928 | 0.054814790 | AT5G07400 |
| EMB2219 | 0.18136003 | 0.07410954 | 0.034460777 | 0.000000000 | 0.029574962 | 0.016040059 | 0.007074285 | 0.00000000 | 0.000000000 | 0.000000000 | 0.020100406 | AT2G21710 | 0.029574962 | 0.10857031 | 0.023114344 | 0.10857031 | 0.020100406 | EMB2219 |
| APTX | 0.14751860 | 0.00000000 | 0.071588024 | 0.000000000 | 0.003827751 | 0.013823899 | 0.003237423 | 0.00000000 | 0.000000000 | 0.028966382 | 0.026075116 | AT5G01310 | 0.003827751 | 0.07158802 | 0.017061323 | 0.10055441 | 0.055041498 | APTX |
| MAC5B | 0.18046972 | 0.02975577 | 0.021373931 | 0.000000000 | 0.000000000 | 0.029413220 | 0.003237423 | 0.00000000 | 0.022701985 | 0.042172976 | 0.031814419 | AT2G29580 | 0.000000000 | 0.05112970 | 0.055352629 | 0.09330267 | 0.073987395 | MAC5B |
| AT2G46040 | 0.16369601 | 0.01823264 | 0.068838688 | 0.006114153 | 0.025486950 | 0.007766728 | 0.000000000 | 0.00000000 | 0.004556113 | 0.004365742 | 0.028335003 | AT2G46040 | 0.031601103 | 0.08707132 | 0.012322840 | 0.09143707 | 0.032700745 | AT2G46040 |
| AT3G19184 | 0.14029450 | 0.01040465 | 0.036787635 | 0.000000000 | 0.000000000 | 0.007766728 | 0.000000000 | 0.00000000 | 0.051226834 | 0.034108648 | 0.000000000 | AT3G19184 | 0.000000000 | 0.04719229 | 0.058993561 | 0.08130094 | 0.034108648 | AT3G19184 |
| AT3G51180 | 0.11114410 | 0.04024887 | 0.027050861 | 0.000000000 | 0.029753047 | 0.002360119 | 0.011731201 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G51180 | 0.029753047 | 0.06729974 | 0.014091321 | 0.06729974 | 0.000000000 | AT3G51180 |
| AT3G07260 | 0.10749679 | 0.01565861 | 0.000000000 | 0.000000000 | 0.033306000 | 0.010330830 | 0.000000000 | 0.00000000 | 0.000000000 | 0.048201359 | 0.000000000 | AT3G07260 | 0.033306000 | 0.01565861 | 0.010330830 | 0.06385996 | 0.048201359 | AT3G07260 |
| TCP4 | 0.09707787 | 0.01565861 | 0.000000000 | 0.017648099 | 0.012440191 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.044436088 | 0.006894881 | AT3G15030 | 0.030088290 | 0.01565861 | 0.000000000 | 0.06009469 | 0.051330970 | TCP4 |
| AT1G61960 | 0.07369076 | 0.01928682 | 0.030223489 | 0.000000000 | 0.002870813 | 0.010135432 | 0.000000000 | 0.00000000 | 0.000000000 | 0.004365742 | 0.006808466 | AT1G61960 | 0.002870813 | 0.04951031 | 0.010135432 | 0.05387605 | 0.011174208 | AT1G61960 |
| CIA2 | 0.06313337 | 0.00000000 | 0.029848508 | 0.016616040 | 0.003827751 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.012841074 | 0.000000000 | AT5G57180 | 0.020443791 | 0.02984851 | 0.000000000 | 0.04268958 | 0.012841074 | CIA2 |
options(repr.plot.width=8, repr.plot.height=40)
ggplot(epilrc_rank, aes(x=reorder(GeneName, epilrc, decreasing = FALSE), y=epilrc)) + geom_point(size=4)+
labs(title="Epidermis+LRC-specific TF Prioritization",x="", y = "Combined centrality score (betweeness, out and in degree)")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(epilrc_rank,"Epidermis_LRC_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- epilrc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Epidermis (includes LRC)", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
stele_rank <- bc_rank[which(bc_rank$stele*2 > bc_rank$all),]%>% arrange(desc(stele))
stele_rank <- stele_rank[-c(match(rownames(per_rank), rownames(stele_rank)),match(rownames(pro_rank), rownames(stele_rank)),match(rownames(xyl_rank), rownames(stele_rank)),match(rownames(phl_rank), rownames(stele_rank))),]
stele_rank$GeneName <- rownames(stele_rank)
stele_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| BZIP9 | 31.71447 | 0.00000000 | 0.000000000 | 0.000000000 | 0.006698565 | 8.0463558 | 11.944304 | 0.03622764 | 11.680885 | 0.00000000 | 0.00000000 | AT5G24800 | 0.006698565 | 0.000000000 | 31.70777 | 0.000000000 | 0.00000000 | BZIP9 |
| AT3G43430 | 29.50134 | 0.00000000 | 0.000000000 | 0.005375774 | 0.006698565 | 8.9241430 | 10.033691 | 3.50786160 | 7.023572 | 0.00000000 | 0.00000000 | AT3G43430 | 0.012074338 | 0.000000000 | 29.48927 | 0.000000000 | 0.00000000 | AT3G43430 |
| LEP | 35.57643 | 3.67988635 | 5.198969256 | 0.568088689 | 4.608115051 | 12.3723072 | 5.865853 | 0.21451060 | 2.929608 | 0.13909305 | 0.00000000 | AT5G13910 | 5.176203740 | 8.878855607 | 21.38228 | 9.017948659 | 0.13909305 | LEP |
| HB-8 | 20.22047 | 0.00000000 | 0.008662067 | 0.000000000 | 0.000000000 | 2.6361377 | 6.036853 | 8.18332066 | 3.355497 | 0.00000000 | 0.00000000 | AT4G32880 | 0.000000000 | 0.008662067 | 20.21181 | 0.008662067 | 0.00000000 | HB-8 |
| MYB20 | 19.03556 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 5.8160656 | 7.091989 | 3.20671764 | 2.920785 | 0.00000000 | 0.00000000 | AT1G66230 | 0.000000000 | 0.000000000 | 19.03556 | 0.000000000 | 0.00000000 | MYB20 |
| HAT2 | 32.66051 | 0.00000000 | 0.000000000 | 6.841854634 | 6.821161147 | 6.2848471 | 4.586768 | 2.80786121 | 4.953272 | 0.00000000 | 0.36474865 | AT5G47370 | 13.663015781 | 0.000000000 | 18.63275 | 0.000000000 | 0.36474865 | HAT2 |
| AT1G61660 | 18.17403 | 0.00000000 | 0.000000000 | 0.000000000 | 0.003827751 | 5.2904445 | 6.741888 | 1.44004495 | 4.697828 | 0.00000000 | 0.00000000 | AT1G61660 | 0.003827751 | 0.000000000 | 18.17021 | 0.000000000 | 0.00000000 | AT1G61660 |
| AT5G05790 | 17.03660 | 0.00000000 | 0.000000000 | 0.000000000 | 0.158795612 | 6.5991434 | 3.488748 | 0.11344400 | 6.676472 | 0.00000000 | 0.00000000 | AT5G05790 | 0.158795612 | 0.000000000 | 16.87781 | 0.000000000 | 0.00000000 | AT5G05790 |
| IAA12 | 16.82887 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 1.4006059 | 7.169331 | 5.61947935 | 2.639450 | 0.00000000 | 0.00000000 | AT1G04550 | 0.000000000 | 0.000000000 | 16.82887 | 0.000000000 | 0.00000000 | IAA12 |
| DAG1 | 16.77714 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 4.5627956 | 6.988757 | 1.03954406 | 4.186043 | 0.00000000 | 0.00000000 | AT3G61850 | 0.000000000 | 0.000000000 | 16.77714 | 0.000000000 | 0.00000000 | DAG1 |
| AT1G29160 | 17.92719 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 3.6244354 | 6.498144 | 0.00000000 | 6.534672 | 1.15644899 | 0.11348907 | AT1G29160 | 0.000000000 | 0.000000000 | 16.65725 | 1.156448993 | 1.26993807 | AT1G29160 |
| AT3G60490 | 16.31230 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 4.6810522 | 5.038575 | 0.11546813 | 6.477208 | 0.00000000 | 0.00000000 | AT3G60490 | 0.000000000 | 0.000000000 | 16.31230 | 0.000000000 | 0.00000000 | AT3G60490 |
| ATAUX2-11 | 16.29304 | 0.09194796 | 0.000000000 | 0.134816302 | 0.015170558 | 0.7387878 | 5.228388 | 7.73246237 | 2.169390 | 0.09843132 | 0.08364182 | AT5G43700 | 0.149986860 | 0.091947958 | 15.86903 | 0.190379281 | 0.18207314 | ATAUX2-11 |
| GBF6 | 15.90920 | 0.00000000 | 0.000000000 | 0.030692191 | 0.822865104 | 2.5528700 | 4.057993 | 2.52959924 | 5.874417 | 0.00000000 | 0.04076601 | AT4G34590 | 0.853557295 | 0.000000000 | 15.01488 | 0.000000000 | 0.04076601 | GBF6 |
| MYB43 | 14.25244 | 0.00000000 | 0.000000000 | 0.000000000 | 0.083918310 | 4.5182255 | 6.614451 | 0.33532323 | 2.700519 | 0.00000000 | 0.00000000 | AT5G16600 | 0.083918310 | 0.000000000 | 14.16852 | 0.000000000 | 0.00000000 | MYB43 |
| AT4G29100 | 14.22914 | 0.00000000 | 0.000000000 | 0.000000000 | 0.186437105 | 7.0551232 | 4.597310 | 0.00000000 | 2.390265 | 0.00000000 | 0.00000000 | AT4G29100 | 0.186437105 | 0.000000000 | 14.04270 | 0.000000000 | 0.00000000 | AT4G29100 |
| AT2G41130 | 15.89891 | 0.06704657 | 0.103382331 | 1.025798825 | 0.685158671 | 5.9003615 | 3.011974 | 3.91761657 | 1.187571 | 0.00000000 | 0.00000000 | AT2G41130 | 1.710957495 | 0.170428905 | 14.01752 | 0.170428905 | 0.00000000 | AT2G41130 |
| GRP2B | 18.32815 | 0.55714929 | 0.005692168 | 0.727141625 | 0.369605755 | 1.0601005 | 2.996230 | 4.87776676 | 4.926582 | 1.48514283 | 1.32274366 | AT2G21060 | 1.096747380 | 0.562841462 | 13.86068 | 2.047984289 | 2.80788649 | GRP2B |
| BZIP61 | 20.01519 | 2.40562483 | 0.222213629 | 1.436841604 | 1.707943482 | 2.9291559 | 3.354289 | 2.39724621 | 5.155067 | 0.34296047 | 0.06384801 | AT3G58120 | 3.144785087 | 2.627838455 | 13.83576 | 2.970798924 | 0.40680848 | BZIP61 |
| HAT1 | 21.96502 | 1.26400857 | 0.082594641 | 1.091118254 | 1.008889922 | 4.3719031 | 4.638934 | 1.64392442 | 3.139757 | 3.62896872 | 1.09492642 | AT4G17460 | 2.100008176 | 1.346603212 | 13.79452 | 4.975571929 | 4.72389514 | HAT1 |
| HB40 | 13.65514 | 0.00000000 | 0.088978236 | 0.000000000 | 0.000000000 | 0.6533290 | 1.369664 | 5.09085865 | 6.452311 | 0.00000000 | 0.00000000 | AT4G36740 | 0.000000000 | 0.088978236 | 13.56616 | 0.088978236 | 0.00000000 | HB40 |
| BT1 | 13.72208 | 0.00000000 | 0.000000000 | 0.065580025 | 0.192824030 | 1.6833276 | 4.366075 | 5.24896676 | 2.165310 | 0.00000000 | 0.00000000 | AT5G63160 | 0.258404056 | 0.000000000 | 13.46368 | 0.000000000 | 0.00000000 | BT1 |
| MIF1 | 15.27371 | 0.00000000 | 0.000000000 | 0.327534768 | 1.536133210 | 4.7785009 | 4.279324 | 0.00000000 | 4.250218 | 0.05521773 | 0.04678356 | AT1G74660 | 1.863667979 | 0.000000000 | 13.30804 | 0.055217730 | 0.10200129 | MIF1 |
| SGR5 | 13.30780 | 0.00000000 | 0.000000000 | 0.000000000 | 0.014876306 | 1.4021166 | 4.667050 | 2.03434142 | 5.189417 | 0.00000000 | 0.00000000 | AT2G01940 | 0.014876306 | 0.000000000 | 13.29292 | 0.000000000 | 0.00000000 | SGR5 |
| MYB88 | 13.10895 | 0.00000000 | 0.000000000 | 0.000000000 | 0.002772068 | 1.2191321 | 6.033888 | 3.78752809 | 2.065631 | 0.00000000 | 0.00000000 | AT2G02820 | 0.002772068 | 0.000000000 | 13.10618 | 0.000000000 | 0.00000000 | MYB88 |
| AT3G11280 | 12.79288 | 0.00000000 | 0.000000000 | 0.000000000 | 0.028048425 | 4.0258395 | 3.021415 | 0.00000000 | 5.717573 | 0.00000000 | 0.00000000 | AT3G11280 | 0.028048425 | 0.000000000 | 12.76483 | 0.000000000 | 0.00000000 | AT3G11280 |
| UNE12 | 12.85333 | 0.00000000 | 0.000000000 | 0.000000000 | 0.357978648 | 3.1073856 | 3.812328 | 2.05427524 | 3.485992 | 0.00000000 | 0.03537439 | AT4G02590 | 0.357978648 | 0.000000000 | 12.45998 | 0.000000000 | 0.03537439 | UNE12 |
| OBP3 | 12.13314 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 2.2427787 | 4.954698 | 0.27562968 | 4.660031 | 0.00000000 | 0.00000000 | AT3G55370 | 0.000000000 | 0.000000000 | 12.13314 | 0.000000000 | 0.00000000 | OBP3 |
| AT5G51780 | 14.69064 | 0.25004783 | 0.604400906 | 0.321266594 | 1.634404722 | 4.1575218 | 3.295748 | 2.08680087 | 2.340453 | 0.00000000 | 0.00000000 | AT5G51780 | 1.955671316 | 0.854448732 | 11.88052 | 0.854448732 | 0.00000000 | AT5G51780 |
| AT4G24060 | 11.93982 | 0.00000000 | 0.000000000 | 0.062882405 | 0.370314736 | 3.2345887 | 2.822960 | 2.59228573 | 2.856792 | 0.00000000 | 0.00000000 | AT4G24060 | 0.433197140 | 0.000000000 | 11.50663 | 0.000000000 | 0.00000000 | AT4G24060 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| AT5G40710 | 0.26020929 | 0.01116550 | 0.000000000 | 0.00000000 | 0.058615210 | 0.021355507 | 0.065009924 | 0.00000000 | 0.104063148 | 0.000000000 | 0.000000000 | AT5G40710 | 0.058615210 | 0.011165498 | 0.19042858 | 0.011165498 | 0.000000000 | AT5G40710 |
| AT2G19260 | 0.25130475 | 0.00000000 | 0.000000000 | 0.00000000 | 0.014120941 | 0.100731777 | 0.018713376 | 0.01978027 | 0.044542186 | 0.028499833 | 0.024916367 | AT2G19260 | 0.014120941 | 0.000000000 | 0.18376761 | 0.028499833 | 0.053416200 | AT2G19260 |
| LAS | 0.22382719 | 0.00000000 | 0.000000000 | 0.00000000 | 0.043810571 | 0.090034874 | 0.089981748 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT1G55580 | 0.043810571 | 0.000000000 | 0.18001662 | 0.000000000 | 0.000000000 | LAS |
| VAL3 | 0.27926874 | 0.00000000 | 0.000000000 | 0.04523431 | 0.000000000 | 0.017847095 | 0.128852354 | 0.00000000 | 0.031292517 | 0.028722186 | 0.027320279 | AT4G21550 | 0.045234306 | 0.000000000 | 0.17799197 | 0.028722186 | 0.056042465 | VAL3 |
| AT2G38950 | 0.33544261 | 0.00000000 | 0.056788452 | 0.00000000 | 0.086526802 | 0.057807235 | 0.043490422 | 0.00000000 | 0.071928191 | 0.002995879 | 0.015905624 | AT2G38950 | 0.086526802 | 0.056788452 | 0.17322585 | 0.059784331 | 0.018901503 | AT2G38950 |
| SDG25 | 0.25894804 | 0.00000000 | 0.000000000 | 0.00000000 | 0.035379956 | 0.014167734 | 0.036027097 | 0.00000000 | 0.117347280 | 0.000000000 | 0.056025973 | AT5G42400 | 0.035379956 | 0.000000000 | 0.16754211 | 0.000000000 | 0.056025973 | SDG25 |
| MBD13 | 0.30390691 | 0.00000000 | 0.000000000 | 0.05365164 | 0.003827751 | 0.078263167 | 0.040506647 | 0.00000000 | 0.043030201 | 0.031866351 | 0.052761156 | AT5G52230 | 0.057479387 | 0.000000000 | 0.16180001 | 0.031866351 | 0.084627507 | MBD13 |
| HSF3 | 0.30421533 | 0.00000000 | 0.000000000 | 0.00000000 | 0.086451872 | 0.030637072 | 0.064599130 | 0.00000000 | 0.065830074 | 0.009499944 | 0.047197239 | AT5G16820 | 0.086451872 | 0.000000000 | 0.16106628 | 0.009499944 | 0.056697184 | HSF3 |
| SCL21 | 0.28114022 | 0.02226175 | 0.033925319 | 0.01017919 | 0.000000000 | 0.016786360 | 0.004199394 | 0.00000000 | 0.139862000 | 0.043727902 | 0.010198297 | AT2G04890 | 0.010179194 | 0.056187073 | 0.16084775 | 0.099914975 | 0.053926199 | SCL21 |
| AT5G65130 | 0.23730831 | 0.00000000 | 0.064772449 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.08574344 | 0.074334240 | 0.000000000 | 0.012458184 | AT5G65130 | 0.000000000 | 0.064772449 | 0.16007768 | 0.064772449 | 0.012458184 | AT5G65130 |
| AT5G14370 | 0.17334037 | 0.00000000 | 0.000000000 | 0.01353632 | 0.002870813 | 0.081326309 | 0.042885269 | 0.00000000 | 0.032721655 | 0.000000000 | 0.000000000 | AT5G14370 | 0.016407136 | 0.000000000 | 0.15693323 | 0.000000000 | 0.000000000 | AT5G14370 |
| AT1G19860 | 0.22628034 | 0.00000000 | 0.018781565 | 0.00000000 | 0.031552204 | 0.069462882 | 0.037944553 | 0.00000000 | 0.033861047 | 0.016512576 | 0.018165511 | AT1G19860 | 0.031552204 | 0.018781565 | 0.14126848 | 0.035294141 | 0.034678087 | AT1G19860 |
| AT1G62085 | 0.20960622 | 0.02186979 | 0.034460777 | 0.00000000 | 0.003827751 | 0.102853222 | 0.007547768 | 0.01978027 | 0.000000000 | 0.000000000 | 0.019266650 | AT1G62085 | 0.003827751 | 0.056330563 | 0.13018126 | 0.056330563 | 0.019266650 | AT1G62085 |
| FRS10 | 0.17041273 | 0.00000000 | 0.011433919 | 0.00000000 | 0.003827751 | 0.018565271 | 0.051245253 | 0.00000000 | 0.056945280 | 0.005735605 | 0.022659651 | AT5G28530 | 0.003827751 | 0.011433919 | 0.12675580 | 0.017169524 | 0.028395256 | FRS10 |
| TGA6 | 0.19215983 | 0.00000000 | 0.034167033 | 0.00000000 | 0.031552204 | 0.043466313 | 0.043991676 | 0.00000000 | 0.038982605 | 0.000000000 | 0.000000000 | AT3G12250 | 0.031552204 | 0.034167033 | 0.12644059 | 0.034167033 | 0.000000000 | TGA6 |
| AT3G02860 | 0.23245733 | 0.00000000 | 0.031275923 | 0.00000000 | 0.038670616 | 0.050736132 | 0.060085776 | 0.00000000 | 0.011312625 | 0.009663261 | 0.030712999 | AT3G02860 | 0.038670616 | 0.031275923 | 0.12213453 | 0.040939184 | 0.040376259 | AT3G02860 |
| AT5G13920 | 0.21269532 | 0.00000000 | 0.027322404 | 0.01222001 | 0.051059473 | 0.018320817 | 0.084760563 | 0.00000000 | 0.019012050 | 0.000000000 | 0.000000000 | AT5G13920 | 0.063279483 | 0.027322404 | 0.12209343 | 0.027322404 | 0.000000000 | AT5G13920 |
| AT1G43770 | 0.20676072 | 0.03713171 | 0.015616942 | 0.00000000 | 0.003827751 | 0.053464062 | 0.053156227 | 0.00000000 | 0.013406625 | 0.021060252 | 0.009097158 | AT1G43770 | 0.003827751 | 0.052748648 | 0.12002691 | 0.073808900 | 0.030157410 | AT1G43770 |
| FRS9 | 0.13528633 | 0.00000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.031718981 | 0.005523898 | 0.02308060 | 0.059382051 | 0.015580800 | 0.000000000 | AT4G38170 | 0.000000000 | 0.000000000 | 0.11970553 | 0.015580800 | 0.015580800 | FRS9 |
| NAC027 | 0.12413172 | 0.00000000 | 0.000000000 | 0.00000000 | 0.004784689 | 0.041671103 | 0.045320602 | 0.00000000 | 0.023200558 | 0.000000000 | 0.009154768 | AT1G64105 | 0.004784689 | 0.000000000 | 0.11019226 | 0.000000000 | 0.009154768 | NAC027 |
| TRFL5 | 0.14312991 | 0.00000000 | 0.000000000 | 0.00000000 | 0.002870813 | 0.058813157 | 0.017640279 | 0.01975855 | 0.000000000 | 0.021390624 | 0.022656480 | AT1G15720 | 0.002870813 | 0.000000000 | 0.09621199 | 0.021390624 | 0.044047105 | TRFL5 |
| bHLH11 | 0.18408627 | 0.04580234 | 0.000000000 | 0.00000000 | 0.000000000 | 0.058202728 | 0.019898352 | 0.00000000 | 0.017855968 | 0.000000000 | 0.042326876 | AT4G36060 | 0.000000000 | 0.045802345 | 0.09595705 | 0.045802345 | 0.042326876 | bHLH11 |
| AT1G10610 | 0.14221184 | 0.00000000 | 0.000000000 | 0.00000000 | 0.002870813 | 0.002360119 | 0.048597252 | 0.04264086 | 0.002199011 | 0.002995879 | 0.040547901 | AT1G10610 | 0.002870813 | 0.000000000 | 0.09579724 | 0.002995879 | 0.043543780 | AT1G10610 |
| BMY2 | 0.18348363 | 0.02459270 | 0.005692168 | 0.00000000 | 0.021140607 | 0.036665392 | 0.015084507 | 0.00000000 | 0.041931477 | 0.021884313 | 0.016492464 | AT5G45300 | 0.021140607 | 0.030284867 | 0.09368138 | 0.052169180 | 0.038376777 | BMY2 |
| DRD1 | 0.09119323 | 0.00000000 | 0.000000000 | 0.00000000 | 0.003827751 | 0.025719936 | 0.014128219 | 0.00000000 | 0.038420168 | 0.000000000 | 0.009097158 | AT2G16390 | 0.003827751 | 0.000000000 | 0.07826832 | 0.000000000 | 0.009097158 | DRD1 |
| ATE2F2 | 0.12868852 | 0.00000000 | 0.005184388 | 0.00000000 | 0.023153228 | 0.038082444 | 0.036911594 | 0.00000000 | 0.000000000 | 0.012841074 | 0.012515794 | AT1G47870 | 0.023153228 | 0.005184388 | 0.07499404 | 0.018025461 | 0.025356867 | ATE2F2 |
| EMB3114 | 0.07913222 | 0.00000000 | 0.000000000 | 0.00000000 | 0.004784689 | 0.034380657 | 0.021674624 | 0.00000000 | 0.000000000 | 0.012584920 | 0.005707328 | AT2G36000 | 0.004784689 | 0.000000000 | 0.05605528 | 0.012584920 | 0.018292248 | EMB3114 |
| MYB64 | 0.06699660 | 0.00000000 | 0.000000000 | 0.01017919 | 0.000000000 | 0.000000000 | 0.000000000 | 0.02968126 | 0.023208496 | 0.003927655 | 0.000000000 | AT5G11050 | 0.010179194 | 0.000000000 | 0.05288975 | 0.003927655 | 0.003927655 | MYB64 |
| AT2G24680 | 0.04609876 | 0.00000000 | 0.021561422 | 0.00000000 | 0.000000000 | 0.009939028 | 0.014598309 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT2G24680 | 0.000000000 | 0.021561422 | 0.02453734 | 0.021561422 | 0.000000000 | AT2G24680 |
| SHOT1 | 0.02413120 | 0.00000000 | 0.000000000 | 0.00000000 | 0.004784689 | 0.008298713 | 0.011047795 | 0.00000000 | 0.000000000 | 0.000000000 | 0.000000000 | AT3G60400 | 0.004784689 | 0.000000000 | 0.01934651 | 0.000000000 | 0.000000000 | SHOT1 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(stele_rank[1:10,], aes(x=reorder(GeneName, stele, decreasing = FALSE), y=stele)) + geom_point(size=4)+
labs(title="Stele-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(stele_rank,"Stele_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- stele_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Stele", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))
rc_rank <- bc_rank[which(bc_rank$rc*2 > bc_rank$all),]%>% arrange(desc(rc))
rc_rank <- rc_rank[-c(match(rownames(lrc_rank), rownames(rc_rank)),match(rownames(col_rank), rownames(rc_rank))),]
rc_rank$GeneName <- rownames(rc_rank)
rc_rank
| all | atri | tri | cor | end | per | pro | xyl | phl | lrc | col | GeneID | ground | epi | stele | epilrc | rc | GeneName | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | <dbl> | <dbl> | <dbl> | <dbl> | <dbl> | <chr> | |
| NAI1 | 25.350401 | 3.35510951 | 0.367456996 | 1.25315937 | 0.059301306 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 10.769132 | 9.546241 | AT2G22770 | 1.312460674 | 3.72256651 | 0.00000000 | 14.491699 | 20.315374 | NAI1 |
| BT2 | 21.716559 | 4.25507281 | 1.229291484 | 0.26928090 | 0.010526316 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 9.186771 | 6.765617 | AT3G48360 | 0.279807219 | 5.48436429 | 0.00000000 | 14.671135 | 15.952388 | BT2 |
| AT1G32700 | 19.481028 | 0.07769675 | 0.000000000 | 0.03221927 | 0.095772000 | 0.31077520 | 1.10140689 | 0.20503616 | 2.42733679 | 6.354357 | 8.876429 | AT1G32700 | 0.127991275 | 0.07769675 | 4.04455503 | 6.432053 | 15.230785 | AT1G32700 |
| AT1G26680 | 17.203575 | 0.39270382 | 0.000000000 | 1.73518478 | 0.000000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 8.496138 | 6.579548 | AT1G26680 | 1.735184777 | 0.39270382 | 0.00000000 | 8.888841 | 15.075686 | AT1G26680 |
| PLT1 | 22.943416 | 3.57380550 | 0.000000000 | 2.59211779 | 1.958605076 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 9.283443 | 5.535445 | AT3G20840 | 4.550722869 | 3.57380550 | 0.00000000 | 12.857248 | 14.818888 | PLT1 |
| AT1G36060 | 18.204785 | 2.34713011 | 0.468806411 | 0.68077581 | 0.240522072 | 0.01832082 | 0.00000000 | 0.00000000 | 0.00000000 | 6.149425 | 8.299804 | AT1G36060 | 0.921297881 | 2.81593653 | 0.01832082 | 8.965362 | 14.449229 | AT1G36060 |
| LBD15 | 18.810274 | 1.91536509 | 0.007969035 | 0.61761953 | 0.000000000 | 0.00000000 | 0.00000000 | 2.30414675 | 0.00000000 | 8.501162 | 5.464012 | AT2G40470 | 0.617619534 | 1.92333413 | 2.30414675 | 10.424496 | 13.965173 | LBD15 |
| SMB | 19.125611 | 4.24334879 | 0.000000000 | 1.58206588 | 0.177682110 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 7.807289 | 5.315225 | AT1G79580 | 1.759747994 | 4.24334879 | 0.00000000 | 12.050638 | 13.122514 | SMB |
| CRF3 | 20.564564 | 3.27450445 | 2.361877234 | 1.34299504 | 0.897433896 | 0.18772725 | 0.02324283 | 0.00000000 | 0.00000000 | 8.641354 | 3.835429 | AT5G53290 | 2.240428936 | 5.63638169 | 0.21097009 | 14.277736 | 12.476783 | CRF3 |
| BRON | 19.061757 | 2.93816754 | 0.903218088 | 1.84289559 | 0.959242938 | 0.03377985 | 0.00000000 | 0.00000000 | 0.00000000 | 7.639246 | 4.745207 | AT1G75710 | 2.802138528 | 3.84138563 | 0.03377985 | 11.480632 | 12.384453 | BRON |
| AXR3 | 17.571332 | 3.86085484 | 0.008611306 | 1.04979133 | 0.007979130 | 0.15702640 | 2.14533991 | 0.00000000 | 0.08629990 | 2.289563 | 7.965865 | AT1G04250 | 1.057770463 | 3.86946614 | 2.38866621 | 6.159030 | 10.255429 | AXR3 |
| AIL6 | 11.982311 | 1.53425303 | 0.000000000 | 0.39819629 | 0.177586443 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 4.850310 | 5.021966 | AT5G10510 | 0.575782729 | 1.53425303 | 0.00000000 | 6.384563 | 9.872276 | AIL6 |
| RAV2 | 12.024870 | 0.22948830 | 0.000000000 | 0.00000000 | 0.003827751 | 0.67746843 | 1.03051504 | 0.12209050 | 0.42800123 | 4.520432 | 5.013047 | AT1G68840 | 0.003827751 | 0.22948830 | 2.25807520 | 4.749921 | 9.533479 | RAV2 |
| BIM1 | 13.733519 | 1.70321980 | 0.272236569 | 0.50585720 | 0.164453289 | 0.24330030 | 0.36198208 | 0.08576516 | 1.07417198 | 4.526706 | 4.795826 | AT5G08130 | 0.670310488 | 1.97545637 | 1.76521951 | 6.502163 | 9.322532 | BIM1 |
| NAC094 | 15.991661 | 3.50205073 | 0.000000000 | 2.11854588 | 1.223563829 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 5.255983 | 3.891518 | AT5G39820 | 3.342109707 | 3.50205073 | 0.00000000 | 8.758034 | 9.147501 | NAC094 |
| FEZ | 16.902047 | 3.63567564 | 0.000000000 | 2.46283874 | 2.072760934 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 4.909008 | 3.821764 | AT1G26870 | 4.535599675 | 3.63567564 | 0.00000000 | 8.544683 | 8.730771 | FEZ |
| ZFP5 | 14.793854 | 2.26734635 | 0.152957279 | 0.00000000 | 0.000000000 | 0.07725790 | 0.24114298 | 3.43745358 | 0.13367347 | 5.078753 | 3.405269 | AT1G10480 | 0.000000000 | 2.42030363 | 3.88952793 | 7.499056 | 8.484022 | ZFP5 |
| AT3G52440 | 9.362833 | 0.27888930 | 0.000000000 | 0.78371031 | 0.000000000 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 3.658878 | 4.641356 | AT3G52440 | 0.783710308 | 0.27888930 | 0.00000000 | 3.937767 | 8.300234 | AT3G52440 |
| SPT | 11.817388 | 1.64841104 | 0.000000000 | 1.24716994 | 0.203225366 | 0.21705035 | 0.10631062 | 0.30484460 | 0.04591837 | 4.455628 | 3.588829 | AT4G36930 | 1.450395306 | 1.64841104 | 0.67412394 | 6.104039 | 8.044458 | SPT |
| PLT2 | 13.333592 | 2.36200615 | 0.000000000 | 1.77150120 | 1.120909320 | 0.05700562 | 0.00000000 | 0.00000000 | 0.00000000 | 4.972074 | 3.050095 | AT1G51190 | 2.892410520 | 2.36200615 | 0.05700562 | 7.334080 | 8.022169 | PLT2 |
| AGL21 | 10.923673 | 0.32407343 | 0.000000000 | 1.71661937 | 0.279724769 | 0.25158153 | 0.25522363 | 0.00000000 | 0.09524688 | 4.386963 | 3.614240 | AT4G37940 | 1.996344139 | 0.32407343 | 0.60205204 | 4.711037 | 8.001203 | AGL21 |
| WRKY15 | 9.661925 | 0.56412728 | 0.000000000 | 0.68297120 | 0.662720653 | 0.02902500 | 0.11010806 | 0.00000000 | 0.00000000 | 2.846779 | 4.766194 | AT2G23320 | 1.345691857 | 0.56412728 | 0.13913306 | 3.410906 | 7.612973 | WRKY15 |
| EEL | 12.245219 | 2.79844075 | 0.000000000 | 1.45996538 | 0.380182803 | 0.07532643 | 0.00000000 | 0.00000000 | 0.00000000 | 5.209129 | 2.322174 | AT2G41070 | 1.840148181 | 2.79844075 | 0.07532643 | 8.007570 | 7.531304 | EEL |
| AT1G68920 | 9.480605 | 0.58507109 | 0.000000000 | 0.31154125 | 0.147887373 | 0.00000000 | 0.00000000 | 0.00000000 | 0.92726005 | 4.205802 | 3.303043 | AT1G68920 | 0.459428621 | 0.58507109 | 0.92726005 | 4.790873 | 7.508846 | AT1G68920 |
| AT4G39780 | 13.782997 | 1.23770438 | 1.660505978 | 0.26830805 | 0.426178270 | 0.03449453 | 0.06075072 | 0.00000000 | 2.78283335 | 3.110263 | 4.201959 | AT4G39780 | 0.694486323 | 2.89821036 | 2.87807861 | 6.008474 | 7.312222 | AT4G39780 |
| AT1G49475 | 10.288504 | 0.83000575 | 0.000000000 | 1.68831366 | 0.381413147 | 0.05914161 | 0.04252059 | 0.00000000 | 0.00000000 | 4.266174 | 3.020935 | AT1G49475 | 2.069726808 | 0.83000575 | 0.10166221 | 5.096179 | 7.287109 | AT1G49475 |
| ATL6 | 9.325592 | 0.78001899 | 0.072562100 | 1.26275288 | 0.111286723 | 0.03839192 | 0.10885699 | 0.06269541 | 0.15937929 | 3.111895 | 3.617753 | AT3G05200 | 1.374039602 | 0.85258109 | 0.36932361 | 3.964476 | 6.729648 | ATL6 |
| IAA33 | 10.961264 | 1.63762467 | 0.000000000 | 1.87717292 | 0.902536907 | 0.00000000 | 0.00000000 | 0.00000000 | 0.00000000 | 3.555443 | 2.988487 | AT5G57420 | 2.779709822 | 1.63762467 | 0.00000000 | 5.193067 | 6.543930 | IAA33 |
| HSFA7A | 8.110707 | 0.19182285 | 0.003426918 | 0.10888833 | 0.099361398 | 0.15345988 | 0.21868553 | 0.07568389 | 0.74900271 | 3.407619 | 3.102756 | AT3G51910 | 0.208249731 | 0.19524976 | 1.19683201 | 3.602869 | 6.510375 | HSFA7A |
| AT1G22190 | 11.232425 | 3.27800514 | 0.042334119 | 1.29170095 | 0.149037346 | 0.00000000 | 0.05758817 | 0.17819611 | 0.02312925 | 4.036429 | 2.176005 | AT1G22190 | 1.440738292 | 3.32033926 | 0.25891353 | 7.356768 | 6.212434 | AT1G22190 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| AT1G02670 | 0.50739488 | 0.115328951 | 0.000000000 | 0.122157383 | 0.000000000 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.187748721 | 0.082159827 | AT1G02670 | 0.122157383 | 0.115328951 | 0.000000000 | 0.303077672 | 0.26990855 | AT1G02670 |
| AT2G48100 | 0.51349399 | 0.046437960 | 0.042132248 | 0.000000000 | 0.028259018 | 0.039179480 | 0.049323355 | 0.00000000 | 0.049935061 | 0.144170213 | 0.114056656 | AT2G48100 | 0.028259018 | 0.088570208 | 0.138437896 | 0.232740422 | 0.25822687 | AT2G48100 |
| EFS | 0.49203848 | 0.007107143 | 0.106064054 | 0.043736765 | 0.031552204 | 0.009456681 | 0.034595540 | 0.00000000 | 0.013133380 | 0.053085829 | 0.193306883 | AT1G77300 | 0.075288969 | 0.113171197 | 0.057185601 | 0.166257026 | 0.24639271 | EFS |
| EMB2773 | 0.41785338 | 0.000000000 | 0.029724263 | 0.025483048 | 0.045004634 | 0.009416679 | 0.011973978 | 0.00000000 | 0.055577254 | 0.082000666 | 0.158672861 | AT5G15540 | 0.070487682 | 0.029724263 | 0.076967911 | 0.111724929 | 0.24067353 | EMB2773 |
| AT2G20110 | 0.28193951 | 0.035245793 | 0.000000000 | 0.000000000 | 0.004784689 | 0.002528828 | 0.000000000 | 0.00000000 | 0.000000000 | 0.107954546 | 0.131425650 | AT2G20110 | 0.004784689 | 0.035245793 | 0.002528828 | 0.143200339 | 0.23938020 | AT2G20110 |
| AT4G29000 | 0.30515594 | 0.000000000 | 0.018061780 | 0.000000000 | 0.036550357 | 0.012248714 | 0.006346626 | 0.00000000 | 0.000000000 | 0.097027757 | 0.134920705 | AT4G29000 | 0.036550357 | 0.018061780 | 0.018595340 | 0.115089537 | 0.23194846 | AT4G29000 |
| AT2G47090 | 0.28430413 | 0.000000000 | 0.003426918 | 0.023837312 | 0.014120941 | 0.004888947 | 0.010332741 | 0.00000000 | 0.004556113 | 0.137150745 | 0.085990417 | AT2G47090 | 0.037958253 | 0.003426918 | 0.019777802 | 0.140577663 | 0.22314116 | AT2G47090 |
| NPR4 | 0.39091647 | 0.037197487 | 0.035836482 | 0.017601364 | 0.041798074 | 0.008335605 | 0.030750214 | 0.00000000 | 0.000000000 | 0.059228012 | 0.160169235 | AT4G19660 | 0.059399437 | 0.073033969 | 0.039085819 | 0.132261981 | 0.21939725 | NPR4 |
| TAF6B | 0.34252600 | 0.044182992 | 0.033528794 | 0.026843501 | 0.002870813 | 0.008486070 | 0.000000000 | 0.00000000 | 0.019324561 | 0.079484057 | 0.127805211 | AT1G54360 | 0.029714315 | 0.077711787 | 0.027810631 | 0.157195843 | 0.20728927 | TAF6B |
| AT1G77250 | 0.38779598 | 0.030851146 | 0.058274008 | 0.022148446 | 0.055871591 | 0.010655722 | 0.010085824 | 0.00000000 | 0.002199011 | 0.107642409 | 0.090067819 | AT1G77250 | 0.078020037 | 0.089125154 | 0.022940557 | 0.196767563 | 0.19771023 | AT1G77250 |
| PIE1 | 0.27238849 | 0.000000000 | 0.000000000 | 0.010404860 | 0.042726621 | 0.023477984 | 0.002159837 | 0.00000000 | 0.008577267 | 0.108566987 | 0.076474936 | AT3G12810 | 0.053131481 | 0.000000000 | 0.034215089 | 0.108566987 | 0.18504192 | PIE1 |
| FLD | 0.35345806 | 0.000000000 | 0.009680922 | 0.000000000 | 0.073088056 | 0.033985248 | 0.014041275 | 0.00000000 | 0.038186067 | 0.077352476 | 0.107124012 | AT3G10390 | 0.073088056 | 0.009680922 | 0.086212590 | 0.087033398 | 0.18447649 | FLD |
| AT4G14720 | 0.30141939 | 0.000000000 | 0.000000000 | 0.000000000 | 0.024978949 | 0.013086660 | 0.032681851 | 0.00000000 | 0.053320450 | 0.074947299 | 0.102404181 | AT4G14720 | 0.024978949 | 0.000000000 | 0.099088961 | 0.074947299 | 0.17735148 | AT4G14720 |
| LSMT-L | 0.27575885 | 0.060354690 | 0.005184388 | 0.017127618 | 0.000000000 | 0.000000000 | 0.000000000 | 0.01647994 | 0.000000000 | 0.124557552 | 0.052054663 | AT1G14030 | 0.017127618 | 0.065539077 | 0.016479937 | 0.190096629 | 0.17661221 | LSMT-L |
| AT5G22760 | 0.31310190 | 0.000000000 | 0.031596045 | 0.023723812 | 0.037713678 | 0.020452725 | 0.007547768 | 0.00000000 | 0.022360760 | 0.067819278 | 0.101887835 | AT5G22760 | 0.061437490 | 0.031596045 | 0.050361253 | 0.099415323 | 0.16970711 | AT5G22760 |
| AT1G04390 | 0.24649084 | 0.037660137 | 0.000000000 | 0.013510450 | 0.027629248 | 0.004609448 | 0.002159837 | 0.00000000 | 0.000000000 | 0.071280430 | 0.089641286 | AT1G04390 | 0.041139699 | 0.037660137 | 0.006769286 | 0.108940567 | 0.16092172 | AT1G04390 |
| BAM7 | 0.30390126 | 0.000000000 | 0.038665951 | 0.037065681 | 0.025598128 | 0.006057172 | 0.007547768 | 0.00000000 | 0.034234295 | 0.029722733 | 0.125009535 | AT2G45880 | 0.062663809 | 0.038665951 | 0.047839235 | 0.068388683 | 0.15473227 | BAM7 |
| AT5G41580 | 0.27954883 | 0.012683672 | 0.050472455 | 0.011529620 | 0.022196290 | 0.014368771 | 0.000000000 | 0.00000000 | 0.014053141 | 0.067952790 | 0.086292088 | AT5G41580 | 0.033725910 | 0.063156127 | 0.028421912 | 0.131108917 | 0.15424488 | AT5G41580 |
| AT4G21060 | 0.28943815 | 0.000000000 | 0.000000000 | 0.007674624 | 0.004784689 | 0.008295603 | 0.038774398 | 0.00000000 | 0.077396736 | 0.069275709 | 0.083236392 | AT4G21060 | 0.012459313 | 0.000000000 | 0.124466736 | 0.069275709 | 0.15251210 | AT4G21060 |
| AT1G29560 | 0.25467775 | 0.021845447 | 0.000000000 | 0.000000000 | 0.000000000 | 0.000000000 | 0.009723292 | 0.01979112 | 0.052965573 | 0.032763127 | 0.117589185 | AT1G29560 | 0.000000000 | 0.021845447 | 0.082479989 | 0.054608574 | 0.15035231 | AT1G29560 |
| AT2G24650 | 0.22585078 | 0.000000000 | 0.021326300 | 0.000000000 | 0.021029429 | 0.022047518 | 0.000000000 | 0.00000000 | 0.012977382 | 0.055891410 | 0.092578745 | AT2G24650 | 0.021029429 | 0.021326300 | 0.035024899 | 0.077217711 | 0.14847016 | AT2G24650 |
| RAD5 | 0.24159080 | 0.022261754 | 0.015027322 | 0.000000000 | 0.000000000 | 0.028502808 | 0.012567466 | 0.00000000 | 0.026918262 | 0.080908815 | 0.055404376 | AT5G22750 | 0.000000000 | 0.037289076 | 0.067988535 | 0.118197892 | 0.13631319 | RAD5 |
| HSI2 | 0.24652192 | 0.000000000 | 0.006853837 | 0.000000000 | 0.039053084 | 0.022836515 | 0.045426385 | 0.00000000 | 0.004556113 | 0.041436005 | 0.086359982 | AT2G30470 | 0.039053084 | 0.006853837 | 0.072819013 | 0.048289842 | 0.12779599 | HSI2 |
| AT1G10320 | 0.21728644 | 0.000000000 | 0.000000000 | 0.005375774 | 0.009569378 | 0.016914131 | 0.018995584 | 0.00000000 | 0.040649506 | 0.067402101 | 0.058379965 | AT1G10320 | 0.014945152 | 0.000000000 | 0.076559221 | 0.067402101 | 0.12578207 | AT1G10320 |
| HSF1 | 0.20784229 | 0.000000000 | 0.009680922 | 0.000000000 | 0.024110166 | 0.003446658 | 0.018548885 | 0.00000000 | 0.033683929 | 0.058109745 | 0.060261982 | AT4G17750 | 0.024110166 | 0.009680922 | 0.055679472 | 0.067790667 | 0.11837173 | HSF1 |
| FRS6 | 0.16227168 | 0.000000000 | 0.011350371 | 0.000000000 | 0.021029429 | 0.007099672 | 0.019419758 | 0.00000000 | 0.002199011 | 0.025081703 | 0.076091740 | AT1G52520 | 0.021029429 | 0.011350371 | 0.028718442 | 0.036432073 | 0.10117344 | FRS6 |
| NF-YA9 | 0.17359013 | 0.015828651 | 0.006931972 | 0.000000000 | 0.031018654 | 0.020344792 | 0.000000000 | 0.00000000 | 0.003359876 | 0.018215405 | 0.077890784 | AT3G20910 | 0.031018654 | 0.022760623 | 0.023704668 | 0.040976028 | 0.09610619 | NF-YA9 |
| TCP4 | 0.09707787 | 0.015658606 | 0.000000000 | 0.017648099 | 0.012440191 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.044436088 | 0.006894881 | AT3G15030 | 0.030088290 | 0.015658606 | 0.000000000 | 0.060094695 | 0.05133097 | TCP4 |
| AT2G25650 | 0.03213272 | 0.000000000 | 0.000000000 | 0.000000000 | 0.004784689 | 0.000000000 | 0.000000000 | 0.00000000 | 0.000000000 | 0.011471211 | 0.015876819 | AT2G25650 | 0.004784689 | 0.000000000 | 0.000000000 | 0.011471211 | 0.02734803 | AT2G25650 |
| AT4G19650 | 0.02388565 | 0.000000000 | 0.000000000 | 0.000000000 | 0.003827751 | 0.006057172 | 0.000000000 | 0.00000000 | 0.000000000 | 0.008293398 | 0.005707328 | AT4G19650 | 0.003827751 | 0.000000000 | 0.006057172 | 0.008293398 | 0.01400073 | AT4G19650 |
options(repr.plot.width=6, repr.plot.height=4)
ggplot(rc_rank[1:10,], aes(x=reorder(GeneName, rc, decreasing = FALSE), y=rc)) + geom_point(size=4)+
labs(title="Root Cap-specific TF Prioritization",x="", y = "Combined centrality score")+
theme_classic()+
theme(axis.text.x = element_text(color = "black",
size = 16, angle = 0),
axis.text.y = element_text( color = "black",
size = 16, angle = 0),
plot.title = element_text(color="black", size=18, face="bold"),
axis.title.x = element_text(color="black", size=16, face="bold"))+ coord_flip()
write.csv(stele_rank,"Root_Cap_TF_centrality_all_transition_zscore3.csv", quote=FALSE, row.names=TRUE)
tf_rank <- rc_rank %>% rownames(.)
# Max 20
p1 <- plot_bc(tf_rank[1]) + plot_bc(tf_rank[2]) + plot_bc(tf_rank[3]) + plot_bc(tf_rank[4]) + plot_bc(tf_rank[5])
p2 <- plot_bc(tf_rank[6]) + plot_bc(tf_rank[7]) + plot_bc(tf_rank[8]) + plot_bc(tf_rank[9]) + plot_bc(tf_rank[10])
p3 <- plot_bc(tf_rank[11]) + plot_bc(tf_rank[12]) + plot_bc(tf_rank[13]) + plot_bc(tf_rank[14]) + plot_bc(tf_rank[15])
p4 <- plot_bc(tf_rank[16]) + plot_bc(tf_rank[17]) + plot_bc(tf_rank[18]) + plot_bc(tf_rank[19]) + plot_bc(tf_rank[20])
p5 <- plot_oc(tf_rank[1]) + plot_oc(tf_rank[2]) + plot_oc(tf_rank[3]) + plot_oc(tf_rank[4]) + plot_oc(tf_rank[5])
p6 <- plot_oc(tf_rank[6]) + plot_oc(tf_rank[7]) + plot_oc(tf_rank[8]) + plot_oc(tf_rank[9]) + plot_oc(tf_rank[10])
p7 <- plot_oc(tf_rank[11]) + plot_oc(tf_rank[12]) + plot_oc(tf_rank[13]) + plot_oc(tf_rank[14]) + plot_oc(tf_rank[15])
p8 <- plot_oc(tf_rank[16]) + plot_oc(tf_rank[17]) + plot_oc(tf_rank[18]) + plot_oc(tf_rank[19]) + plot_oc(tf_rank[20])
p9 <- plot_ic(tf_rank[1]) + plot_ic(tf_rank[2]) + plot_ic(tf_rank[3]) + plot_ic(tf_rank[4]) + plot_ic(tf_rank[5])
p10 <- plot_ic(tf_rank[6]) + plot_ic(tf_rank[7]) + plot_ic(tf_rank[8]) + plot_ic(tf_rank[9]) + plot_ic(tf_rank[10])
p11 <- plot_ic(tf_rank[11]) + plot_ic(tf_rank[12]) + plot_ic(tf_rank[13]) + plot_ic(tf_rank[14]) + plot_ic(tf_rank[15])
p12 <- plot_ic(tf_rank[16]) + plot_ic(tf_rank[17]) + plot_ic(tf_rank[18]) + plot_ic(tf_rank[19]) + plot_ic(tf_rank[20])
p1 <- grid.grabExpr(draw(p1))
p2 <- grid.grabExpr(draw(p2))
p3 <- grid.grabExpr(draw(p3))
p4 <- grid.grabExpr(draw(p4))
p5 <- grid.grabExpr(draw(p5))
p6 <- grid.grabExpr(draw(p6))
p7 <- grid.grabExpr(draw(p7))
p8 <- grid.grabExpr(draw(p8))
p9 <- grid.grabExpr(draw(p9))
p10 <- grid.grabExpr(draw(p10))
p11 <- grid.grabExpr(draw(p11))
p12 <- grid.grabExpr(draw(p12))
col_fun = colorRamp2(c(0, 0.001, 1), c('navy',"khaki1", "red"))
legend_grob1 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "weighted\nnetwork\ncentrality")))
col_fun = colorRamp2(c(0, 0.001, 1), c('gainsboro', "grey", "black"))
legend_grob2 <- grid.grabExpr(draw(Legend(col_fun = col_fun, title = "unweighted\nnetwork\ncentrality")))
options(repr.plot.width=24, repr.plot.height=12)
plot_grid(plot_grid(textbox_grob("Main Regulatory TFs for Root Cap", gp = gpar(fontsize = 20, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),
plot_grid(plot_grid(textbox_grob("Betweenness centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p1,p2,p3,p4,nrow=4),nrow=2,rel_heights = c(1, 14))
,plot_grid(textbox_grob("Out-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p5,p6,p7,p8,nrow=4),nrow=2,rel_heights=c(1,14))
,plot_grid(textbox_grob("In-degree centrality", gp = gpar(fontsize = 16, col='black'), background_gp = gpar(fill = "#FFFFFF", col = NA)),plot_grid(p9,p10,p11,p12,nrow=4),nrow=2,rel_heights=c(1,14)),nrow=1),nrow=2,rel_heights = c(1, 14)),plot_grid(legend_grob1,legend_grob2,nrow=2), rel_widths = c(19, 1))